More Stuff

This commit is contained in:
Caleb Gardner
2024-06-17 18:01:37 -05:00
parent fdd8d49055
commit fa9330a959
4 changed files with 89 additions and 3 deletions
+75
View File
@@ -6,9 +6,43 @@ A simple blog module for darkstorm-backend.
### Author info
#### Get author info
> GET /author/{authorID}
```json
{
id: "authorID",
about: "about",
picurl: "picture URL"
}
```
#### Update author info
> POST /author/{authorID}
Must have a auth token for a user with the `"blog": "admin"` permission.
```json
{
about: "about",
picurl: "picture url"
}
```
#### Add Author info
> POST /author
Must have a auth token for a user with the `"blog": "admin"` permission.
```json
{
id: "authorID",
about: "about",
picurl: "picture URL"
}
```
### Blog
@@ -31,6 +65,47 @@ Return:
}
```
#### Create blog
Request:
> POST /blog
Must have a auth token for a user with the `"blog": "admin"` permission.
```json
{
author: "authorID",
favicon: "favicon url",
title: "blog title",
blog: "blog", // blog will have been converted to HTML
}
```
Return:
```json
{
id: "blogID"
}
```
#### Update blog
Request:
> POST /blog/{blogID}
Must have a auth token for a user with the `"blog": "admin"` permission.
```json
{
favicon: "new icon",
title: "new title",
blog: "new blog content"
}
```
#### Latest blogs
> GET /blog?page=0