Compare commits

..

3 Commits

Author SHA1 Message Date
Kayne Ruse 7d40005e7d Bumped version number 2022-01-02 18:12:31 +00:00
Kayne Ruse 855de182ea Mods can now add and edit the news feed 2022-01-02 18:11:43 +00:00
Kayne Ruse a96e7d9344 Updated README.md 2021-12-30 13:52:13 +00:00
4 changed files with 5 additions and 4 deletions
+1
View File
@@ -48,6 +48,7 @@ GET /news/archive/:id
"title": title, //title of the article "title": title, //title of the article
"author": author, //author of the aricle "author": author, //author of the aricle
"body": body, //body of the article "body": body, //body of the article
"rendered": rendered //body rendered as HTML
"edits": edits //number of times this article has been edited "edits": edits //number of times this article has been edited
"createdAt": createdAt //time created "createdAt": createdAt //time created
"updatedAt": updatedAt //time updated "updatedAt": updatedAt //time updated
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "news-server", "name": "news-server",
"version": "1.4.0", "version": "1.4.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "news-server", "name": "news-server",
"version": "1.4.0", "version": "1.4.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"cors": "^2.8.5", "cors": "^2.8.5",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "news-server", "name": "news-server",
"version": "1.4.0", "version": "1.4.1",
"description": "An API centric news server. Uses Sequelize and mariaDB by default.", "description": "An API centric news server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js", "main": "server/server.js",
"scripts": { "scripts": {
+1 -1
View File
@@ -23,7 +23,7 @@ router.get('/archive/metadata/:id(\\d+)', query(true, true));
//use middleware to authenticate the rest of the routes //use middleware to authenticate the rest of the routes
router.use(authToken); router.use(authToken);
router.use((req, res, next) => { router.use((req, res, next) => {
if (req.user.admin) { if (req.user.mod) {
next(); next();
} else { } else {
res.status(403).end(); res.status(403).end();