mirror of
https://git.victorphan.net/basketballcantho/zalo-monitor.git
synced 2026-08-06 22:43:11 +07:00
init
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { apiFactory } from "../utils.js";
|
||||
|
||||
import type { User } from "../models/index.js";
|
||||
|
||||
export type FetchAccountInfoResponse = { profile: User };
|
||||
|
||||
export const fetchAccountInfoFactory = apiFactory<FetchAccountInfoResponse>()((api, _, utils) => {
|
||||
const serviceURL = utils.makeURL(`${api.zpwServiceMap.profile[0]}/api/social/profile/me-v2`);
|
||||
|
||||
return async function fetchAccountInfo() {
|
||||
const response = await utils.request(serviceURL, {
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
return utils.resolve(response);
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user