Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackowski committed Jun 21, 2016
1 parent e5fee2c commit 23db89d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
10 changes: 1 addition & 9 deletions api.js
Expand Up @@ -64,14 +64,6 @@ var getFeedData = function (site) {
}
};

var initSampleSites = function(site) {
db.sites.insert(site, function (err, site) {
if (err) {
console.log('Error occured during site save');
}
});
};

var getFeeds = function () {
db.sites.find({}, function (err, sites) {
if (err) {
Expand Down Expand Up @@ -122,7 +114,7 @@ app.post('/api/sites', function (req, res) {
if (err) {
res.send({ error: err });
} else {
res.send({ data: req.body });
res.send({ data: site });
}
});
});
Expand Down
14 changes: 7 additions & 7 deletions electron.js
@@ -1,9 +1,9 @@
var backRssApi = require('./api');
var electron = require('app');
var BrowserWindow = require('browser-window');
var shell = require('shell');
var Menu = require('menu');
var MenuItem = require('menu-item');
var electron = require('electron').app;
var BrowserWindow = require('electron').BrowserWindow;
var shell = require('electron').Shell;
var Menu = require('electron').Menu;
var MenuItem = require('electron').MenuItem;

backRssApi.start();

Expand Down Expand Up @@ -73,7 +73,7 @@ if (process.platform !== 'darwin') {
if (!aboutWindow) {
aboutWindow = new BrowserWindow({ width: 400, height: 120, "node-integration": false, frame: true,
resizable: false, "always-on-top": true });
aboutWindow.loadUrl('http://localhost:8080/about.html');
aboutWindow.loadURL('http://localhost:8080/about.html');

aboutWindow.on('closed', function () {
aboutWindow = null;
Expand Down Expand Up @@ -159,7 +159,7 @@ if (process.platform !== 'darwin') {
}

function createMainWindow() {
mainWindow = new BrowserWindow({ width: 1200, height: 768, "node-integration": false, icon: __dirname + '/public/images/icon.png'});
mainWindow = new BrowserWindow({ width: 1200, height: 768, webPreferences: { nodeIntegration: false }, icon: __dirname + '/public/images/icon.png'});
mainWindow.loadURL('http://localhost:8080');

mainWindow.on('closed', function() {
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "BackRSS",
"version": "1.0.0",
"version": "1.0.2",
"description": "Simple RSS reader",
"main": "electron.js",
"scripts": {
Expand Down

0 comments on commit 23db89d

Please sign in to comment.