🩹 (simple-fix) fix handler error request

This commit is contained in:
2025-10-07 11:59:22 +07:00
parent 171862aa3a
commit f13f1ccaf1
5 changed files with 51 additions and 17 deletions

View File

@ -1,14 +1,7 @@
"use server";
import { api } from "@/shared/lib/ky/connector";
import { apiErrorHandler } from "@/shared/lib/ky/errorHandler";
import { HTTPError } from "ky";
interface SendCallbackResponse {
success: boolean;
status: number;
text: { message: string };
data?: any;
}
import { ServerRequestCallback } from "@/shared/types/serverRequestCallback";
/**
* @function SendCallbackToServer
@ -64,7 +57,7 @@ interface SendCallbackResponse {
export const SendCallbackToServer = async (
data: string,
provider: string
): Promise<SendCallbackResponse> => {
): Promise<ServerRequestCallback> => {
// Construct the backend and frontend handler URLs
const backendHandlerUrl = `auth/${provider}/callback/`;
const frontendHandlerUrl = `${process.env