move various login routes under auth/
This commit is contained in:
+7
-6
@@ -98,14 +98,15 @@ async function initializeExpressSync() {
|
||||
router.post('/api/v1/cloudron/activate', json, routes.provision.setupTokenAuth, routes.provision.activate);
|
||||
router.get ('/api/v1/cloudron/status', routes.provision.getStatus);
|
||||
router.get ('/api/v1/cloudron/block_devices', routes.provision.getBlockDevices);
|
||||
|
||||
router.get ('/api/v1/cloudron/avatar', routes.branding.getCloudronAvatar); // this is a public alias for /api/v1/branding/cloudron_avatar
|
||||
|
||||
// login/logout routes
|
||||
router.post('/api/v1/cloudron/login', json, password, routes.cloudron.login);
|
||||
router.get ('/api/v1/cloudron/logout', token, routes.cloudron.logout); // this will invalidate the token if any and redirect to / always
|
||||
router.post('/api/v1/cloudron/password_reset_request', json, routes.cloudron.passwordResetRequest);
|
||||
router.post('/api/v1/cloudron/password_reset', json, routes.cloudron.passwordReset);
|
||||
router.post('/api/v1/cloudron/setup_account', json, routes.cloudron.setupAccount);
|
||||
// auth routes
|
||||
router.post('/api/v1/auth/login', json, password, routes.auth.login);
|
||||
router.get ('/api/v1/auth/logout', token, routes.auth.logout); // this will invalidate the token if any and redirect to / always
|
||||
router.post('/api/v1/auth/password_reset_request', json, routes.auth.passwordResetRequest);
|
||||
router.post('/api/v1/auth/password_reset', json, routes.auth.passwordReset);
|
||||
router.post('/api/v1/auth/setup_account', json, routes.auth.setupAccount);
|
||||
|
||||
// config route (for dashboard). can return some private configuration unlike status
|
||||
router.get ('/api/v1/config', token, authorizeUser, routes.cloudron.getConfig);
|
||||
|
||||
Reference in New Issue
Block a user