mirror of
https://github.com/hex248/sprint.git
synced 2026-02-08 02:33:01 +00:00
auth routes
This commit is contained in:
@@ -13,6 +13,10 @@ const main = async () => {
|
|||||||
routes: {
|
routes: {
|
||||||
"/": withCors(() => new Response(`title: eussi\ndev-mode: ${DEV}\nport: ${PORT}`)),
|
"/": withCors(() => new Response(`title: eussi\ndev-mode: ${DEV}\nport: ${PORT}`)),
|
||||||
|
|
||||||
|
"/auth/register": withCors(routes.authRegister),
|
||||||
|
"/auth/login": withCors(routes.authLogin),
|
||||||
|
"/auth/me": withCors(withAuth(routes.authMe)),
|
||||||
|
|
||||||
"/issue/create": withCors(withAuth(routes.issueCreate)),
|
"/issue/create": withCors(withAuth(routes.issueCreate)),
|
||||||
"/issue/update": withCors(withAuth(routes.issueUpdate)),
|
"/issue/update": withCors(withAuth(routes.issueUpdate)),
|
||||||
"/issue/delete": withCors(withAuth(routes.issueDelete)),
|
"/issue/delete": withCors(withAuth(routes.issueDelete)),
|
||||||
|
|||||||
@@ -1,16 +1,18 @@
|
|||||||
|
import authLogin from "./auth/login";
|
||||||
|
import authMe from "./auth/me";
|
||||||
|
import authRegister from "./auth/register";
|
||||||
import issueCreate from "./issue/create";
|
import issueCreate from "./issue/create";
|
||||||
import issueDelete from "./issue/delete";
|
import issueDelete from "./issue/delete";
|
||||||
import issueUpdate from "./issue/update";
|
import issueUpdate from "./issue/update";
|
||||||
import issuesInProject from "./issues/[projectBlob]";
|
import issuesInProject from "./issues/[projectBlob]";
|
||||||
import issues from "./issues/all";
|
import issues from "./issues/all";
|
||||||
|
|
||||||
import projectCreate from "./project/create";
|
|
||||||
import projectUpdate from "./project/update";
|
|
||||||
import projectDelete from "./project/delete";
|
|
||||||
import projectsByOwner from "./project/by-owner";
|
|
||||||
import projectsAll from "./project/all";
|
import projectsAll from "./project/all";
|
||||||
import projectsWithOwners from "./project/with-owners";
|
import projectsByOwner from "./project/by-owner";
|
||||||
|
import projectCreate from "./project/create";
|
||||||
|
import projectDelete from "./project/delete";
|
||||||
|
import projectUpdate from "./project/update";
|
||||||
import projectWithOwner from "./project/with-owner";
|
import projectWithOwner from "./project/with-owner";
|
||||||
|
import projectsWithOwners from "./project/with-owners";
|
||||||
|
|
||||||
export const routes = {
|
export const routes = {
|
||||||
issueCreate,
|
issueCreate,
|
||||||
@@ -27,4 +29,8 @@ export const routes = {
|
|||||||
projectsAll,
|
projectsAll,
|
||||||
projectsWithOwners,
|
projectsWithOwners,
|
||||||
projectWithOwner,
|
projectWithOwner,
|
||||||
|
|
||||||
|
authRegister,
|
||||||
|
authLogin,
|
||||||
|
authMe,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user