mirror of
https://github.com/hknsh/project-knedita.git
synced 2024-11-29 01:41:16 +00:00
22 lines
482 B
TypeScript
22 lines
482 B
TypeScript
import { Router } from 'express'
|
|
|
|
// Controllers
|
|
import post from './posts'
|
|
|
|
// Middlewares
|
|
import authenticated from 'middlewares/authenticated'
|
|
|
|
const postsRouter = Router()
|
|
|
|
// GET
|
|
postsRouter.get('/fetch-likes', post.fetchLikes)
|
|
postsRouter.get('/info', post.fetch)
|
|
|
|
// POST
|
|
postsRouter.post('/create', authenticated, post.create)
|
|
postsRouter.post('/delete', authenticated, post.delete)
|
|
|
|
// PUT
|
|
postsRouter.put('/update', authenticated, post.update)
|
|
|
|
export default postsRouter
|