fix: Upload image
Deskripsi: - Upload image job di arahkan ke storage server ## No Issue
This commit is contained in:
7
src/app/lib/APIs.ts
Normal file
7
src/app/lib/APIs.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
const APIs = {
|
||||
GET: "https://wibu-storage.wibudev.com/api/files/",
|
||||
};
|
||||
|
||||
export default APIs
|
||||
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
export const ApiHipmi = {
|
||||
// Get one token
|
||||
get_token: "/api/user/get-token",
|
||||
// Auth
|
||||
login: "/api/auth/login",
|
||||
validasi: "/api/auth/validasi",
|
||||
register: "/api/auth/register",
|
||||
logout: "/api/auth/logout",
|
||||
|
||||
//Profile
|
||||
create_profile: "/api/profile/create",
|
||||
edit_profile: "/api/profile/edit",
|
||||
get_foto: "/api/profile/foto/",
|
||||
|
||||
//Portofolio
|
||||
create_portofolio: "/api/portofolio/create",
|
||||
|
||||
//Investasi
|
||||
get_gambar_investasi: "/api/investasi/gambar"
|
||||
};
|
||||
14
src/app/lib/id-derectory.ts
Normal file
14
src/app/lib/id-derectory.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
const DIRECTORY_ID = {
|
||||
profile_foto: "cm0x93rgo000jbp5tj8baoaus",
|
||||
profile_background: "cm0x93ze8000lbp5t1a8uc9wl",
|
||||
portofolio_logo: "cm0yjl6ug000310njwmk6j0tx",
|
||||
map_pin: "cm0yjq8up000710njv5klra32",
|
||||
map_image: "cm0yjqnxl000910njplqho07w",
|
||||
investasi_image: "cm0yjs35h000b10njb35o12h1",
|
||||
investasi_bukti_transfer: "cm0yjsflu000d10njrc3lnqho",
|
||||
donasi_image: "cm0yk1coh000f10nj597a99kv",
|
||||
donasi_bukti_transfer: "cm0yk1pmh000h10njhi6m8b8t",
|
||||
job_image: "cm0ypp6zl0003kp7jf59zuvjy",
|
||||
};
|
||||
|
||||
export default DIRECTORY_ID;
|
||||
7
src/app/lib/index.ts
Normal file
7
src/app/lib/index.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import APIs from "./APIs";
|
||||
import DIRECTORY_ID from "./id-derectory";
|
||||
import prisma from "./prisma";
|
||||
|
||||
export { DIRECTORY_ID };
|
||||
export { prisma };
|
||||
export { APIs };
|
||||
18
src/app/lib/token.ts
Normal file
18
src/app/lib/token.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
"use client";
|
||||
|
||||
class TokenStorage {
|
||||
static value = "";
|
||||
static get() {
|
||||
return TokenStorage.value;
|
||||
}
|
||||
static set(value: string) {
|
||||
TokenStorage.value = value;
|
||||
}
|
||||
}
|
||||
|
||||
function TokenProvider({ token }: { token: string }) {
|
||||
TokenStorage.set(token);
|
||||
return null;
|
||||
}
|
||||
|
||||
export { TokenStorage, TokenProvider };
|
||||
Reference in New Issue
Block a user