Compare commits

..

4 Commits

Author SHA1 Message Date
Kayne Ruse 78cda0fe50 Enabled HTML embedding 2022-01-06 11:31:11 +00:00
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
6 changed files with 7 additions and 6 deletions
+1
View File
@@ -48,6 +48,7 @@ GET /news/archive/:id
"title": title, //title of the article
"author": author, //author of the aricle
"body": body, //body of the article
"rendered": rendered //body rendered as HTML
"edits": edits //number of times this article has been edited
"createdAt": createdAt //time created
"updatedAt": updatedAt //time updated
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "news-server",
"version": "1.4.0",
"version": "1.4.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "news-server",
"version": "1.4.0",
"version": "1.4.2",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "news-server",
"version": "1.4.0",
"version": "1.4.2",
"description": "An API centric news server. Uses Sequelize and mariaDB by default.",
"main": "server/server.js",
"scripts": {
+1 -1
View File
@@ -1,6 +1,6 @@
const { Op } = require('sequelize');
const { articles, revisions } = require('../database/models');
const markdownIt = require('markdown-it')();
const markdownIt = require('markdown-it')({ html: true });
const route = async (req, res) => {
//get the existing record
+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
router.use(authToken);
router.use((req, res, next) => {
if (req.user.admin) {
if (req.user.mod) {
next();
} else {
res.status(403).end();
+1 -1
View File
@@ -1,5 +1,5 @@
const { articles } = require('../database/models');
const markdownIt = require('markdown-it')();
const markdownIt = require('markdown-it')({ html: true });
const route = async (req, res) => {
//check for missing data