upd: profile dan katalog
Deskripsi: - mecah dan ganti ke api No Issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { IUserLogin } from './lib/type_user';
|
||||
import { apiGetUserLogin } from "./lib/api_user";
|
||||
import { IUserProfile } from './lib/type_user';
|
||||
import { apiGetUserProfile } from "./lib/api_user";
|
||||
|
||||
export { apiGetUserLogin };
|
||||
export type { IUserLogin };
|
||||
export { apiGetUserProfile };
|
||||
export type { IUserProfile };
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const apiGetUserLogin = async () => {
|
||||
const response = await fetch(`/api/new/user`)
|
||||
export const apiGetUserProfile = async (path?: string) => {
|
||||
const response = await fetch(`/api/new/user${(path) ? path : ''}`)
|
||||
return await response.json().catch(() => null)
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface IUserLogin {
|
||||
export interface IUserProfile {
|
||||
id: string
|
||||
username: string
|
||||
nomor: string
|
||||
|
||||
Reference in New Issue
Block a user