28 lines
742 B
TypeScript
28 lines
742 B
TypeScript
import { WALLET_API_HOST } from "../config/constants";
|
|
import { GET_JSON, POST_JSON } from "../lib/Http";
|
|
|
|
export function googleAuth(idToken: string) {
|
|
const url = `${WALLET_API_HOST}/wallet/login/google`;
|
|
return POST_JSON(url, { token: idToken });
|
|
}
|
|
|
|
export function getWalletInfo() {
|
|
const url = `${WALLET_API_HOST}/wallet/info`;
|
|
return GET_JSON(url);
|
|
}
|
|
|
|
export function uploadWalletInfo(data) {
|
|
const url = `${WALLET_API_HOST}/wallet/info`;
|
|
return POST_JSON(url, data);
|
|
}
|
|
|
|
export function fetchUserCollection() {
|
|
const url = `${WALLET_API_HOST}/wallet/collection`;
|
|
return GET_JSON(url);
|
|
}
|
|
|
|
export function uploadUserCollection(data) {
|
|
const url = `${WALLET_API_HOST}/wallet/collection`;
|
|
return POST_JSON(url, data);
|
|
}
|