|
|
@@ -9,7 +9,8 @@ module.exports = function(crowi, app) {
|
|
|
, installer = require('./installer')(crowi, app)
|
|
|
, user = require('./user')(crowi, app)
|
|
|
, attachment= require('./attachment')(crowi, app)
|
|
|
- , comment= require('./comment')(crowi, app)
|
|
|
+ , comment = require('./comment')(crowi, app)
|
|
|
+ , bookmark = require('./bookmark')(crowi, app)
|
|
|
, loginRequired = middleware.loginRequired
|
|
|
, accessTokenParser = middleware.accessTokenParser
|
|
|
;
|
|
|
@@ -73,13 +74,14 @@ module.exports = function(crowi, app) {
|
|
|
app.post('/_api/attachment/:id/remove',loginRequired(crowi, app), attachment.api.remove);
|
|
|
app.post('/_api/page/:id/like' , loginRequired(crowi, app) , page.api.like);
|
|
|
app.post('/_api/page/:id/unlike' , loginRequired(crowi, app) , page.api.unlike);
|
|
|
- app.get( '/_api/page/:id/bookmark' , loginRequired(crowi, app) , page.api.isBookmarked);
|
|
|
- app.post('/_api/page/:id/bookmark' , loginRequired(crowi, app) , page.api.bookmark);
|
|
|
|
|
|
// HTTP RPC Styled API (に徐々に移行していいこうと思う)
|
|
|
app.get('/_api/pages.get' , accessTokenParser(crowi, app) , loginRequired(crowi, app) , page.api.get);
|
|
|
app.get('/_api/comments.get' , accessTokenParser(crowi, app) , loginRequired(crowi, app) , comment.api.get);
|
|
|
- app.post('/_api/comments.post' , form.comment, accessTokenParser(crowi, app) , loginRequired(crowi, app) , comment.api.post);
|
|
|
+ app.post('/_api/comments.add' , form.comment, accessTokenParser(crowi, app) , loginRequired(crowi, app) , comment.api.add);
|
|
|
+ app.get( '/_api/bookmarks.get' , accessTokenParser(crowi, app) , loginRequired(crowi, app) , bookmark.api.get);
|
|
|
+ app.post('/_api/bookmarks.add' , accessTokenParser(crowi, app) , loginRequired(crowi, app) , bookmark.api.add);
|
|
|
+ app.post('/_api/bookmarks.remove' , accessTokenParser(crowi, app) , loginRequired(crowi, app) , bookmark.api.remove);
|
|
|
//app.get('/_api/revision/:id' , user.useUserData() , revision.api.get);
|
|
|
//app.get('/_api/r/:revisionId' , user.useUserData() , page.api.get);
|
|
|
|