diff --git a/packages/nocodb/src/controllers/auth/auth.controller.ts b/packages/nocodb/src/controllers/auth/auth.controller.ts index df7206e404..7746214ea9 100644 --- a/packages/nocodb/src/controllers/auth/auth.controller.ts +++ b/packages/nocodb/src/controllers/auth/auth.controller.ts @@ -37,7 +37,7 @@ export class AuthController { @Post([ '/auth/user/signup', '/api/v1/db/auth/user/signup', - '/api/v2/auth/user/signup', + '/api/v1/auth/user/signup', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) @@ -57,7 +57,7 @@ export class AuthController { @Post([ '/auth/token/refresh', '/api/v1/db/auth/token/refresh', - '/api/v2/auth/token/refresh', + '/api/v1/auth/token/refresh', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) @@ -74,7 +74,7 @@ export class AuthController { @Post([ '/auth/user/signin', '/api/v1/db/auth/user/signin', - '/api/v2/auth/user/signin', + '/api/v1/auth/user/signin', ]) @UseGuards(PublicApiLimiterGuard, AuthGuard('local')) @HttpCode(200) @@ -87,7 +87,7 @@ export class AuthController { } @UseGuards(GlobalGuard) - @Post('/api/v2/auth/user/signout') + @Post('/api/v1/auth/user/signout') @HttpCode(200) async signOut(@Request() req, @Response() res): Promise { if (!(req as any).isAuthenticated()) { @@ -115,8 +115,8 @@ export class AuthController { // google strategy will take care the request } - @Get(['/auth/user/me', '/api/v1/db/auth/user/me', '/api/v2/auth/user/me']) - @UseGuards(MetaApiLimiterGuard, GlobalGuard) + @Get(['/auth/user/me', '/api/v1/db/auth/user/me', '/api/v1/auth/user/me']) + @UseGuards(GlobalGuard) async me(@Request() req) { const user = { ...req.user, @@ -130,7 +130,7 @@ export class AuthController { @Post([ '/user/password/change', '/api/v1/db/auth/password/change', - '/api/v2/auth/password/change', + '/api/v1/auth/password/change', ]) @UseGuards(MetaApiLimiterGuard, GlobalGuard) @Acl('passwordChange', { @@ -154,7 +154,7 @@ export class AuthController { @Post([ '/auth/password/forgot', '/api/v1/db/auth/password/forgot', - '/api/v2/auth/password/forgot', + '/api/v1/auth/password/forgot', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) @@ -171,7 +171,7 @@ export class AuthController { @Post([ '/auth/token/validate/:tokenId', '/api/v1/db/auth/token/validate/:tokenId', - '/api/v2/auth/token/validate/:tokenId', + '/api/v1/auth/token/validate/:tokenId', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) @@ -185,7 +185,7 @@ export class AuthController { @Post([ '/auth/password/reset/:tokenId', '/api/v1/db/auth/password/reset/:tokenId', - '/api/v2/auth/password/reset/:tokenId', + '/api/v1/auth/password/reset/:tokenId', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) @@ -205,7 +205,7 @@ export class AuthController { @Post([ '/api/v1/db/auth/email/validate/:tokenId', - '/api/v2/auth/email/validate/:tokenId', + '/api/v1/auth/email/validate/:tokenId', ]) @UseGuards(PublicApiLimiterGuard) @HttpCode(200) diff --git a/packages/nocodb/src/schema/swagger.json b/packages/nocodb/src/schema/swagger.json index aab50b534e..8c059f78d9 100644 --- a/packages/nocodb/src/schema/swagger.json +++ b/packages/nocodb/src/schema/swagger.json @@ -88,7 +88,7 @@ } } }, - "/api/v1/db/auth/user/signup": { + "/api/v1/auth/user/signup": { "post": { "summary": "Signup", "operationId": "auth-signup", @@ -187,7 +187,7 @@ "description": "Create a new user with provided email and password and first user is marked as super admin. " } }, - "/api/v1/db/auth/user/signout": { + "/api/v1/auth/user/signout": { "post": { "summary": "Signout", "operationId": "auth-signout", @@ -231,7 +231,7 @@ } ] }, - "/api/v1/db/auth/user/signin": { + "/api/v1/auth/user/signin": { "post": { "summary": "Signin", "operationId": "auth-signin", @@ -292,7 +292,7 @@ } ] }, - "/api/v1/db/auth/user/me": { + "/api/v1/auth/user/me": { "parameters": [ { "$ref": "#/components/parameters/xc-auth" @@ -344,7 +344,7 @@ ] } }, - "/api/v1/db/auth/password/forgot": { + "/api/v1/auth/password/forgot": { "post": { "summary": "Forget Password", "operationId": "auth-password-forgot", @@ -408,7 +408,7 @@ } ] }, - "/api/v1/db/auth/password/change": { + "/api/v1/auth/password/change": { "post": { "summary": "Change Password", "operationId": "auth-password-change", @@ -469,7 +469,7 @@ } ] }, - "/api/v1/db/auth/token/validate/{token}": { + "/api/v1/auth/token/validate/{token}": { "post": { "summary": "Verify Reset Token", "operationId": "auth-password-reset-token-validate", @@ -529,7 +529,7 @@ } ] }, - "/api/v1/db/auth/email/validate/{token}": { + "/api/v1/auth/email/validate/{token}": { "post": { "summary": "Verify Email", "operationId": "auth-email-validate", @@ -589,7 +589,7 @@ } ] }, - "/api/v1/db/uth/password/reset/{token}": { + "/api/v1/auth/password/reset/{token}": { "post": { "summary": "Reset Password", "operationId": "auth-password-reset", @@ -665,7 +665,7 @@ } ] }, - "/api/v1/db/auth/token/refresh": { + "/api/v1/auth/token/refresh": { "post": { "summary": "Refresh Token", "operationId": "auth-token-refresh",