mirror of
https://github.com/20kaushik02/spotify-manager.git
synced 2026-01-25 14:14:06 +00:00
MASSIVE commit
- moved to typescript - axios rate limitmodule is busted, removed for now, do something else for that - sequelize-typescript - dotenv, not dotenv-flow - removed playlist details route types for API ton of minor fixes and improvements
This commit is contained in:
43
routes/operations.ts
Normal file
43
routes/operations.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import { Router } from "express";
|
||||
const opRouter: Router = Router();
|
||||
|
||||
import {
|
||||
updateUser,
|
||||
fetchUser,
|
||||
createLink,
|
||||
removeLink,
|
||||
populateSingleLink,
|
||||
pruneSingleLink,
|
||||
} from "../controllers/operations.ts";
|
||||
import {
|
||||
createLinkValidator,
|
||||
removeLinkValidator,
|
||||
populateSingleLinkValidator,
|
||||
pruneSingleLinkValidator,
|
||||
} from "../validators/operations.ts";
|
||||
|
||||
import { validate } from "../validators/index.ts";
|
||||
|
||||
opRouter.put("/update", updateUser);
|
||||
|
||||
opRouter.get("/fetch", fetchUser);
|
||||
|
||||
opRouter.post("/link", createLinkValidator, validate, createLink);
|
||||
|
||||
opRouter.delete("/link", removeLinkValidator, validate, removeLink);
|
||||
|
||||
opRouter.put(
|
||||
"/populate/link",
|
||||
populateSingleLinkValidator,
|
||||
validate,
|
||||
populateSingleLink
|
||||
);
|
||||
|
||||
opRouter.put(
|
||||
"/prune/link",
|
||||
pruneSingleLinkValidator,
|
||||
validate,
|
||||
pruneSingleLink
|
||||
);
|
||||
|
||||
export default opRouter;
|
||||
Reference in New Issue
Block a user