From 626aac592add2d40ae26a0bad776a6d1607f68e0 Mon Sep 17 00:00:00 2001 From: hanif salafi Date: Thu, 2 Jan 2025 12:13:05 +0700 Subject: [PATCH] feat: update fixing service auth --- service/auth.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/service/auth.ts b/service/auth.ts index 476c2bb1..2d03c465 100644 --- a/service/auth.ts +++ b/service/auth.ts @@ -1,3 +1,4 @@ +import qs from "qs"; import { getAPIDummy } from "./http-config/axiosCustom"; import { httpPost } from "./http-config/http-base-service"; import { @@ -8,7 +9,11 @@ import { export async function login(data: any) { const pathUrl = "signin"; - return httpPost(pathUrl, data); + const headers = { + 'content-type': 'application/x-www-form-urlencoded', + }; + return httpPost(pathUrl, headers, qs.stringify(data)); + } export async function getProfile(token: any) {