-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.ts
74 lines (72 loc) · 1.92 KB
/
config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
export const BACKEND_URL = process.env.NEXT_PUBLIC_BACKEND_URL || 'http://localhost:8080'
export const config = {
google: {
mapApiKey: process.env.NEXT_PUBLIC_GG_MAP_API || '',
bucketName: '',
storageApiKey: '',
projectId: '',
},
auth: {
POST_update: '/api/v1/auth/me',
},
cookies: {
token: 'authToken',
previousPage: 'previousPage',
},
login: {
GET_logout: `/api/v1/auth/logout`,
GET_line: `/api/v1/auth/line`,
GET_me: `/api/v1/auth/me`,
GET_line_jwt: `/api/v1/auth/line/jwt`,
POST_line_register: `/api/v1/auth/register`,
POST_line_login: `/api/v1/auth/login`,
},
pet: {
GET_list: '/api/v1/pet', // Anyone - list pets maps
GET_my: '/api/v1/pet/my', // Shelter - list pets
GET_details: '/api/v1/pet/:pet_id', // Loggedin user - pet details
POST_create: '/api/v1/pet', // Shelter - create pet
PUT_update: '/api/v1/pet', // Shelter - update pet
POST_img: '/api/v1/pet/img', // Shelter - add pet image
},
shelter: {
GET_list: '/api/v1/shelter', // Loggedin user = Shelter list
GET_details: '/api/v1/shelter/:id', // Loggedin user - Shelter details
},
like: {
GET_list: '/api/v1/like',
POST_add: `/api/v1/like/:pet_id`,
DELETE_delete: `/api/v1/like/:pet_id`,
},
interest: {
GET_list: `/api/v1/interest`,
GET_byPetId: `/api/v1/interest`, // params pet_id
POST_add: `/api/v1/interest/:pet_id`,
PUT_update: `/api/v1/interest/:pet_id`,
DELETE_delete: `/api/v1/interest/:pet_id`,
},
tag: {
GET_list: `/api/v1/tag`,
},
}
export const internalPages = {
index: '/',
user: {
index: '/user',
login: '/user/login',
logout: '/user/logout',
register: '/user/register',
liked: '/user/liked',
interested: '/user/interested',
},
about: '/about',
findPets: '/find',
shelters: {
index: '/shelters',
},
pets: {
index: '/pets',
new: '/pets/new',
myPet: '/pets/my',
},
}