mirror of
https://github.com/ramvignesh-b/pi-ku.git
synced 2026-05-04 08:56:52 +00:00
22 lines
560 B
TypeScript
22 lines
560 B
TypeScript
export const endpoints = {
|
|
LOGIN: "/api/auth/login/",
|
|
REGISTER: "/api/auth/register/",
|
|
VERIFY_EMAIL: "/api/auth/verify-email/",
|
|
ACTIVATE: "/api/auth/activate/:uidb64/:token/",
|
|
ME: "/api/auth/me/",
|
|
REFRESH: "/api/auth/refresh/",
|
|
LOGOUT: "/api/auth/logout/",
|
|
};
|
|
|
|
// simple utility to handle path params
|
|
export const replacePathParams = (
|
|
url: string,
|
|
params: Record<string, string>,
|
|
): string => {
|
|
let result = url;
|
|
Object.entries(params).forEach(([key, value]) => {
|
|
result = result.replace(`:${key}`, value);
|
|
});
|
|
return result;
|
|
};
|