Skip to content

Commit 913fa64

Browse files
committed
Add comment on api routes
1 parent e427d7c commit 913fa64

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/server/routes/api.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import localeController from '../controllers/locale';
88
import todoController from '../controllers/todo';
99

1010
export default ({ app }) => {
11+
// user
1112
app.post('/api/user', bodyParser.json, userController.create);
1213
app.post('/api/user/login', bodyParser.json, userController.login);
1314
app.get('/api/user/logout', userController.logout);
@@ -25,11 +26,17 @@ export default ({ app }) => {
2526
filename: 'avatar.jpg',
2627
}).single('avatar'),
2728
userController.uploadAvatar);
29+
30+
// form
2831
app.post('/api/forms/register/fields/email/validation',
2932
bodyParser.json,
3033
formValidationController.register.email
3134
);
35+
36+
// locale
3237
app.get('/api/locale/:locale', localeController.show);
38+
39+
// todo
3340
app.post('/api/todo', bodyParser.json, todoController.create);
3441
app.get('/api/todo', todoController.list);
3542
app.delete('/api/todo/:id', todoController.remove);

0 commit comments

Comments
 (0)