refactor: The update checker has become the announcements checker
Replaces June's endpoint with a continuwuity endpoint. Adds a JSON schema. Closes #89 Closes #760
This commit is contained in:
parent
5486dbda24
commit
2d9bdc0979
12 changed files with 238 additions and 166 deletions
3
docs/static/_headers
vendored
3
docs/static/_headers
vendored
|
@ -1,3 +1,6 @@
|
|||
/.well-known/matrix/*
|
||||
Access-Control-Allow-Origin: *
|
||||
Content-Type: application/json
|
||||
/.well-known/continuwuity/*
|
||||
Access-Control-Allow-Origin: *
|
||||
Content-Type: application/json
|
9
docs/static/announcements.json
vendored
Normal file
9
docs/static/announcements.json
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"$schema": "https://continuwuity.org/schema/announcements.schema.json",
|
||||
"announcements": [
|
||||
{
|
||||
"id": 1,
|
||||
"message": "Welcome to Continuwuity! Important announcements about the project will appear here."
|
||||
}
|
||||
]
|
||||
}
|
31
docs/static/announcements.schema.json
vendored
Normal file
31
docs/static/announcements.schema.json
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
"$id": "https://continwuity.org/schema/announcements.schema.json",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"updates": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"date": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"updates"
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue