Commit 45c8051b authored by Yoon, Daeki's avatar Yoon, Daeki 😅
Browse files

형식 조정

parent 77af16fc
......@@ -4,17 +4,17 @@ const Notice = require('../models/notice');
const router = express.Router();
router.get('/', function (req, res, next) {
Notice.find({}).sort({ post_date: -1 })
.then((notices) => {
res.status(201).json(notices);
})
.catch((err) => {
console.error(err);
Notice.find({}).sort({ post_date: -1 })
.then((notices) => {
res.status(201).json(notices);
})
.catch((err) => {
console.error(err);
next(err);
});
// res.status(404).json({error:"없음."})
res.status(201).json(notices);
next(err);
});
// res.status(404).json({error:"없음."})
res.status(201).json(notices);
});
module.exports = router;
\ No newline at end of file
const express = require('express');
// const path = require('path');
// const multer = require('multer');
// const fs = require('fs');
const express = require('express')
const Notice = require('../models/notice');
const router = express.Router();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment