📦 chore: snapshot commit before major changes
This commit is contained in:
@ -1,14 +1,16 @@
|
||||
import { Context } from "elysia";
|
||||
import { Context, Static } from "elysia";
|
||||
import { mainErrorHandler } from "../../../helpers/error/handler";
|
||||
import { googleRequestService } from "../services/http/googleRequest.service";
|
||||
import { returnReadResponse } from "../../../helpers/callback/httpResponse";
|
||||
import { googleRequestSchema } from "../schemas/googleRequest.schema";
|
||||
|
||||
export const googleRequestController = async (
|
||||
ctx: Context & { query: { callback?: string } }
|
||||
) => {
|
||||
export const googleRequestController = async (ctx: {
|
||||
set: Context["set"];
|
||||
query: Static<typeof googleRequestSchema.query>;
|
||||
}) => {
|
||||
try {
|
||||
const loginUrl = await googleRequestService(ctx.query.callback);
|
||||
return returnReadResponse(ctx.set, 200, "Google login url created!", {
|
||||
return returnReadResponse(ctx.set, 200, "Google login URL created successfully.", {
|
||||
endpointUrl: loginUrl,
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user