NoticeRoutes API Specification
router . get ( '/api/notice' , access , getNotice ) ;
router . get ( '/api/notice/:nid' , access , getNoticeById ) ;
router . post ( '/api/notice' , access , isAdmin , createNotice ) ;
router . delete ( '/api/notice/:nid' , access , isAdmin , deleteNotice ) ;
router . patch ( '/api/notice/:nid' , access , isAdmin , updateNotice ) ;
Header
accessToken: String (Required); Bearer Token
RefreshToken: String (Required); JWT Token
{
"success" : true ,
"result" : [
{
"nid" : 4 ,
"title" : " 공지 추가 테스트~"
},
{
"nid" : 5 ,
"title" : " 공지 개행 테스트"
}
]
}
{
"success" : false ,
"err" : err
}
{
"success" : false ,
"message" : " Login required"
}
Header
accessToken: String (Required); Bearer Token
RefreshToken: String (Required); JWT Token
{
"success" : true ,
"result" : {
"nid" : 4 ,
"title" : " 공지 추가 테스트~" ,
"content" : " 공지 테스트 테스트 테스트~" ,
"createdAt" : " 2021-07-29T00:56:14.000Z"
}
}
{
"success" : false ,
"err" : err
}
{
"success" : false ,
"message" : " Login required"
}
Header
accessToken: String (Required); Bearer Token
RefreshToken: String (Required); JWT Token
title: String (Required)
content: String (Required)
{
"success" : false ,
"err" : err
}
{
"success" : false ,
"message" : " Login required"
}
Header
accessToken: String (Required); Bearer Token
RefreshToken: String (Required); JWT Token
Body; One of these is required
title: String (Optional)
content: String (Optional)
{
"success" : false ,
"err" : err
}
{
"success" : false ,
"message" : " Login required"
}
Header
accessToken: String (Required); Bearer Token
RefreshToken: String (Required); JWT Token
{
"success" : false ,
"err" : err
}
{
"success" : false ,
"message" : " Login required"
}