Compare commits

..

10 Commits

Author SHA1 Message Date
Kayne Ruse eb55709be5 Bumped patch version 2022-06-10 17:23:41 +01:00
Kayne Ruse 446b49c9a0 Updated dependencies 2022-06-10 17:09:19 +01:00
Kayne Ruse 36c309a69c Merge remote-tracking branch 'refs/remotes/origin/main' 2022-05-30 06:46:40 +01:00
Kayne Ruse 3f55ad71cf Updated dependencies 2022-05-30 06:46:08 +01:00
Kayne Ruse f8ec31ff7e Added FUNDING.yml 2022-02-13 07:49:29 +11:00
Kayne Ruse 739311928f Library updates 2022-01-20 13:38:38 +11:00
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
8 changed files with 946 additions and 645 deletions
+5
View File
@@ -0,0 +1,5 @@
# These are supported funding model platforms
patreon: krgamestudios
ko_fi: krgamestudios
custom: ["https://www.paypal.com/donate/?hosted_button_id=73Q82T2ZHV8AA"]
+2 -1
View File
@@ -15,7 +15,7 @@ POST https://dev-auth.krgamestudios.com/auth/login HTTP/1.1
Content-Type: application/json
{
"email": "kayneruse@gmail.com",
"email": "example@example.com",
"password": "helloworld"
}
```
@@ -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
+934 -639
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "news-server",
"version": "1.4.0",
"version": "1.4.5",
"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
+1 -1
View File
@@ -27,7 +27,7 @@ server.listen(process.env.WEB_PORT || 3100, async (err) => {
await database.sync();
console.log(`listening to localhost:${process.env.WEB_PORT || 3100}`);
//parse the unrendered data from the database
//COMPATABILITY: parse the unrendered data from the database
const markdownIt = require('markdown-it')();
const { articles, revisions } = require('./database/models');