@@ -43,7 +43,7 @@ router.get('/:id', async (req, res) => {
4343
4444 // returns created post and all posts
4545
46- router . post ( '/' , authHelper . protected , async ( req , res ) => {
46+ router . post ( '/' , async ( req , res ) => {
4747 let { id, ...newPost } = req . body
4848 console . log ( req . body ) ;
4949
@@ -63,7 +63,7 @@ router.post('/', authHelper.protected, async (req, res) => {
6363
6464/* ========== PUT =========== */
6565
66- router . put ( '/:id' , authHelper . protected , async ( req , res ) => {
66+ router . put ( '/:id' , async ( req , res ) => {
6767 const { id } = req . params
6868 const changes = req . body ;
6969 try {
@@ -90,7 +90,7 @@ router.put('/:id', authHelper.protected, async (req, res) => {
9090
9191/* ========== DELETE =========== */
9292
93- router . delete ( '/:id' , authHelper . protected , async ( req , res ) => {
93+ router . delete ( '/:id' , async ( req , res ) => {
9494 const { id } = req . params ;
9595 try {
9696 const del_post_categories = await db ( 'post-categories' ) . where ( { post_id :id } ) . del ( )
0 commit comments