♻️ refactor: app token and oAuth endpoint request

These changes include:
1. Replacing the app token with a standard authorization barrier.
2. Changing the response body in the OAuth request by wrapping the endpoint link with a structure instead of placing it in the callback payload data.
This commit is contained in:
2026-01-07 23:56:44 +07:00
parent d3fcf281b3
commit d8e8ec3fa7
4 changed files with 23 additions and 18 deletions

View File

@ -8,12 +8,9 @@ export const googleRequestController = async (
) => {
try {
const loginUrl = await googleRequestService(ctx.query.callback);
return returnReadResponse(
ctx.set,
200,
"Google login url created!",
loginUrl
);
return returnReadResponse(ctx.set, 200, "Google login url created!", {
endpointUrl: loginUrl,
});
} catch (error) {
return mainErrorHandler(ctx.set, error);
}