source: imaps-frontend/src/scripts/net/netconfig.js@ 0c6b92a

main
Last change on this file since 0c6b92a was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago

Pred finalna verzija

  • Property mode set to 100644
File size: 1.7 KB
RevLine 
[0c6b92a]1export const API_BASE_URL = "http://localhost:8080/api";
2export const API_PROTECTED = `${API_BASE_URL}/protected`
3export const API_PUBLIC = `${API_BASE_URL}/public`
4export const API_AUTH = `${API_BASE_URL}/auth`
5
[d565449]6
7const config = {
[0c6b92a]8 my_maps: {
9 display: `${API_PROTECTED}/my-maps`,
10 save: `${API_PROTECTED}/my-maps/save`,
11 add: `${API_PROTECTED}/my-maps/create`,
12 load: `${API_PROTECTED}/my-maps/load`,
13 delete: `${API_PROTECTED}/my-maps/delete`,
14 publish: `${API_PROTECTED}/publish/add`,
15 publish_get: `${API_PROTECTED}/publish/get`,
16 },
17 room_types: {
18 display: (auth) => {
19 return auth ? `${API_PROTECTED}/room-types` : `${API_PUBLIC}/room-types`
20 },
21 add: `${API_PROTECTED}/room-types/add`,
22
23 },
24 floors: {
25 add: `${API_PROTECTED}/floors/add`,
26 load: `${API_PROTECTED}/my-maps/load`,
27 delete: `${API_PROTECTED}/floors/delete`,
28 },
29 view_maps: {
30 display: `${API_PUBLIC}/maps`,
31 load: (auth) => {
32 return auth ? `${API_PROTECTED}/load-map` : `${API_PUBLIC}/load-map`
33 },
34 navigate: `${API_PUBLIC}/navigate`,
35 add_favourite: `${API_PROTECTED}/favourites/add`,
36 },
37 favourites: {
38 display: `${API_PROTECTED}/favourites`,
39 add: `${API_PROTECTED}/favourites/add`,
40 delete: `${API_PROTECTED}/favourites/delete`,
41 },
42 auth:{
43 login: `${API_AUTH}/login`,
44 register: `${API_AUTH}/register`,
45 verify: `${API_AUTH}/verify`
46
47 },
48 admin:{
49 display: `${API_BASE_URL}/admin`,
50 load_pr: `${API_BASE_URL}/admin/load-pr`,
51 approve_pr: `${API_BASE_URL}/admin/pr/approve`,
52 deny_pr: `${API_BASE_URL}/admin/pr/deny`
[d565449]53 }
54};
55
[0c6b92a]56
[d565449]57export default config;
Note: See TracBrowser for help on using the repository browser.