Skip to content

Commit

Permalink
fix err for nodebb 0.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
erlgo committed Dec 7, 2014
1 parent c6946f4 commit 6efdc72
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
14 changes: 3 additions & 11 deletions library.js
Original file line number Diff line number Diff line change
Expand Up @@ -615,17 +615,9 @@ function setupTranslations(app) {
});
}

plugin.init = function (params, callback) {

var app = params.router,
middleware = params.middleware,
controllers = params.controllers;

// We create two routes for every view. One API call, and the actual route itself.
// Just add the buildHeader middleware to your route and NodeBB will take care of everything for you.

app.get('/admin' + config.plugin.route, middleware.applyCSRF, middleware.admin.buildHeader, renderAdmin);
app.get('/api/admin' + config.plugin.route, middleware.applyCSRF, renderAdmin);
plugin.load = function (app, middleware, controllers, callback) {
app.get('/admin' + config.plugin.route, middleware.admin.buildHeader, renderAdmin);
app.get('/api/admin' + config.plugin.route, renderAdmin);

SocketPlugins[config.plugin.id] = clientHandlers;
SocketAdmin[config.plugin.id] = adminHandlers;
Expand Down
13 changes: 10 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,16 @@
"name": "erlgo",
"email": "erlgo@ipc6.com"
},
"license": "BSD-2-Clause",
"license": "MIT",
"bugs": {
"url": "https://github.com/erlgo/nodebb-plugin-portal-mark/issues"
},
"readmeFilename": "README.md"
}
"nbbpm": {
"compatibility": "^0.5.0"
},
"readmeFilename": "README.md",
"_id": "nodebb-plugin-portal-mark@0.0.1",
"_shasum": "20022c434716b873b4130c668566302735f32d11",
"_resolved": "https://registry.npmjs.org/nodebb-plugin-portal-mark/-/nodebb-plugin-portal-mark-0.0.1.tgz",
"_from": "https://registry.npmjs.org/nodebb-plugin-portal-mark/-/nodebb-plugin-portal-mark-0.0.1.tgz"
}
25 changes: 13 additions & 12 deletions plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,20 @@
"description": "This plugin can mark topic as news article for portals site building.",
"url": "https://github.com/erlgo/nodebb-plugin-portal-mark",
"library": "./library.js",
"less": [
"static/style.less"
],
"scripts": [
"static/lib/loader.js",
"static/lib/client"
],
"staticDirs": {
"static": "./static"
},
"templates": "static/templates",
"hooks": [{
"hook": "static:app.load",
"method": "init"
"method": "load"
}, {
"hook": "filter:privileges.topics.get",
"method": "filter.privileges.topics.get"
Expand All @@ -20,15 +31,5 @@
"hook": "filter:admin.header.build",
"method": "addAdminNavigation"
}],
"staticDirs": {
"static": "./static"
},
"less": [
"static/style.less"
],
"scripts": [
"static/lib/loader.js",
"static/lib/client"
],
"templates": "static/templates"
"compatibility": "~0.5.0"
}

0 comments on commit 6efdc72

Please sign in to comment.