π¨ The ultimate agentic social media scheduling tool π€
TypeScript nextjsopen-sourceopen-source-social-media-scheduling-toolosspostiz-cloudpostiz-hostedredisscheduling-toolsocial-media-scheduling-tooltypescript
feat: load first
Nevo David4e277ed32d33
diff --git a/apps/backend/src/api/routes/auth.controller.ts b/apps/backend/src/api/routes/auth.controller.tsindex 04e67984c..536b52d13 100644--- a/apps/backend/src/api/routes/auth.controller.ts+++ b/apps/backend/src/api/routes/auth.controller.ts@@ -199,6 +199,19 @@ export class AuthController {};}+ @Get('/oauth/mobile-callback')+ mobileCallback(+ @Query('code') code: string,+ @Query('state') state: string,+ @Res({ passthrough: false }) response: Response+ ) {+ const scheme = process.env.MOBILE_APP_SCHEME || 'postiz://auth/callback';+ const params = new URLSearchParams();+ if (code) params.set('code', code);+ if (state) params.set('state', state);+ return response.redirect(302, `${scheme}?${params.toString()}`);+ }+@Get('/oauth/:provider')async oauthLink(@Param('provider') provider: string, @Query() query: any) {return this._authService.oauthLink(provider, query);@@ -210,7 +223,10 @@ export class AuthController {@Body('datafast_visitor_id') datafast_visitor_id: string,@Res({ passthrough: false }) response: Response) {- const activate = await this._authService.activate(code, datafast_visitor_id);+ const activate = await this._authService.activate(+ code,+ datafast_visitor_id+ );if (!activate) {return response.status(200).json({ can: false });}@@ -251,19 +267,6 @@ export class AuthController {}}- @Get('/oauth/mobile-callback')- mobileCallback(- @Query('code') code: string,- @Query('state') state: string,- @Res({ passthrough: false }) response: Response- ) {- const scheme = process.env.MOBILE_APP_SCHEME || 'postiz://auth/callback';- const params = new URLSearchParams();- if (code) params.set('code', code);- if (state) params.set('state', state);- return response.redirect(302, `${scheme}?${params.toString()}`);- }-@Post('/oauth/:provider/exists')async oauthExists(@Body('code') code: string,