Adding oauth route to API

This commit is contained in:
Fabian Stamm 2018-11-06 21:20:15 +01:00
parent c855083f3e
commit 9cfc5643a5

View File

@ -5,12 +5,14 @@ import InternalRoute from "./internal";
import Login from "./user/login"; import Login from "./user/login";
import { AuthGetUser } from "./client/user"; import { AuthGetUser } from "./client/user";
import * as cors from "cors"; import * as cors from "cors";
import OAuthRoute from "./oauth";
const ApiRouter: express.IRouter<void> = express.Router(); const ApiRouter: express.IRouter<void> = express.Router();
ApiRouter.use("/admin", AdminRoute); ApiRouter.use("/admin", AdminRoute);
ApiRouter.use(cors()) ApiRouter.use(cors())
ApiRouter.use("/user", UserRoute); ApiRouter.use("/user", UserRoute);
ApiRouter.use("/internal", InternalRoute); ApiRouter.use("/internal", InternalRoute);
ApiRouter.use("/oauth", OAuthRoute);
ApiRouter.use("/user", AuthGetUser); ApiRouter.use("/user", AuthGetUser);