58 lines
2.3 KiB
TypeScript
Executable File
58 lines
2.3 KiB
TypeScript
Executable File
const BASE_URL = import.meta.env.VITE_BASE_URL || "http://192.168.1.13:8888";
|
|
|
|
const SIGNUP_URI = `${BASE_URL}/user/signup`;
|
|
const LOGIN_URI = `${BASE_URL}/user/login`;
|
|
const LOGOUT_URI = `${BASE_URL}/user/logout`;
|
|
|
|
const GET_REGIONS = `${BASE_URL}/regions`;
|
|
const GET_REGENCIES = `${BASE_URL}/region/regencies`;
|
|
const GET_PROVINCES = `${BASE_URL}/region/provinces`;
|
|
|
|
const GET_CURRENT_USER_STATS = `${BASE_URL}/user/profile`;
|
|
const PATCH_USER_AVATAR = `${BASE_URL}/user/avatar`;
|
|
const PATCH_USER_INFO = `${BASE_URL}/user`;
|
|
const DELETE_USER_AVATAR = `${BASE_URL}/user/avatar`;
|
|
|
|
const GET_NEWS_EVENTS_URI = `${BASE_URL}/news-events`;
|
|
const POST_NEWS_EVENTS_URI = GET_NEWS_EVENTS_URI;
|
|
|
|
const GET_LIST_LOCATIONS_URI = `${BASE_URL}/locations`;
|
|
const GET_SEARCH_LOCATIONS_URI = `${BASE_URL}/locations/search`;
|
|
const GET_LIST_TOP_LOCATIONS = `${BASE_URL}/locations/top-ratings`;
|
|
const GET_LIST_RECENT_LOCATIONS_RATING_URI = `${BASE_URL}/locations/recent`;
|
|
const GET_LOCATION_URI = `${BASE_URL}/location`;
|
|
const GET_LOCATION_TAGS_URI = `${BASE_URL}/location/tags`;
|
|
const POST_CREATE_LOCATION = GET_LIST_LOCATIONS_URI;
|
|
|
|
const GET_IMAGES_BY_LOCATION_URI = `${BASE_URL}/images/location`;
|
|
|
|
const POST_REVIEW_LOCATION_URI = `${BASE_URL}/review/location`;
|
|
const POST_REVIEW_IMAGES_URI = `${BASE_URL}/review/location/images`;
|
|
const GET_CURRENT_USER_REVIEW_LOCATION_URI = `${BASE_URL}/user/review/location`;
|
|
|
|
export {
|
|
BASE_URL,
|
|
LOGIN_URI,
|
|
LOGOUT_URI,
|
|
SIGNUP_URI,
|
|
DELETE_USER_AVATAR,
|
|
GET_NEWS_EVENTS_URI,
|
|
GET_REGIONS,
|
|
GET_PROVINCES,
|
|
GET_REGENCIES,
|
|
GET_CURRENT_USER_STATS,
|
|
GET_LIST_RECENT_LOCATIONS_RATING_URI,
|
|
GET_LIST_TOP_LOCATIONS,
|
|
GET_LIST_LOCATIONS_URI,
|
|
GET_LOCATION_URI,
|
|
GET_SEARCH_LOCATIONS_URI,
|
|
GET_LOCATION_TAGS_URI,
|
|
GET_IMAGES_BY_LOCATION_URI,
|
|
GET_CURRENT_USER_REVIEW_LOCATION_URI,
|
|
PATCH_USER_AVATAR,
|
|
PATCH_USER_INFO,
|
|
POST_REVIEW_LOCATION_URI,
|
|
POST_REVIEW_IMAGES_URI,
|
|
POST_CREATE_LOCATION,
|
|
POST_NEWS_EVENTS_URI,
|
|
} |