chore: fix styles and change the apis
This commit is contained in:
@@ -1,36 +1,12 @@
|
||||
import {
|
||||
type SendEmailOtpPayload,
|
||||
type TokenApiResponse,
|
||||
type ConfirmEmailOtpPayload,
|
||||
type CompleteUserInfoPayload,
|
||||
type CompleteUserInfoResponse,
|
||||
type GenericApiResponse,
|
||||
} from './types';
|
||||
import axios from 'axios';
|
||||
} from '../types/completionFormApiTypes';
|
||||
import apiClient from '@/lib/apiClient';
|
||||
|
||||
const AUTH_API_URL = 'https://accounts.business-harmony.com';
|
||||
|
||||
export const getTokenApi = async (): Promise<TokenApiResponse> => {
|
||||
const body = new URLSearchParams();
|
||||
body.set('grant_type', 'password');
|
||||
body.set('username', 'zareian.1381@gmail.com');
|
||||
body.set('password', '123@Qweasd');
|
||||
body.set('client_id', 'harmony_identity');
|
||||
body.set('scope', 'openid harmony_identity profile offline_access');
|
||||
|
||||
const { data } = await axios.post<TokenApiResponse>(
|
||||
`${AUTH_API_URL}/connect/token`,
|
||||
body.toString(),
|
||||
{
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
},
|
||||
},
|
||||
);
|
||||
return data;
|
||||
};
|
||||
|
||||
export const sendEmailOtpApi = async (
|
||||
payload: SendEmailOtpPayload,
|
||||
): Promise<GenericApiResponse & { codeSentAnyway?: boolean }> => {
|
||||
|
||||
Reference in New Issue
Block a user