mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
* feat(realtime-chat): add Pusher library to the server * feat(realtime-chat): only for private groups * feat(realtime-chat): add authentication endpoint for Pusher * feat(realtime-chat): client proof of concept * fix typo in apidoc * feat(realtime-chat): redo authentication and write integration tests * remove firebase code * fix client side tests * fix line ending in bower.json * feat(realtime chat): use presence channels for parties, send events & disconnect clients if user leaves or is removed from party, automatically update UI * pusher: enable all events in the background * fix pusher integration tests
21 lines
962 B
JavaScript
21 lines
962 B
JavaScript
var auth = require('../../controllers/api-v2/auth');
|
|
var express = require('express');
|
|
var i18n = require('../../libs/api-v2/i18n');
|
|
var router = express.Router();
|
|
import {
|
|
getUserLanguage
|
|
} from '../../middlewares/api-v3/language';
|
|
|
|
/* auth.auth*/
|
|
// auth.setupPassport(router); //TODO make this consistent with the others
|
|
router.post('/register', getUserLanguage, auth.registerUser);
|
|
router.post('/user/auth/local', getUserLanguage, auth.loginLocal);
|
|
router.post('/user/auth/social', getUserLanguage, auth.loginSocial);
|
|
router.delete('/user/auth/social', getUserLanguage, auth.auth, auth.deleteSocial);
|
|
router.post('/user/reset-password', getUserLanguage, auth.resetPassword);
|
|
router.post('/user/change-password', getUserLanguage, auth.auth, auth.changePassword);
|
|
router.post('/user/change-username', getUserLanguage, auth.auth, auth.changeUsername);
|
|
router.post('/user/change-email', getUserLanguage, auth.auth, auth.changeEmail);
|
|
|
|
module.exports = router;
|