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:
Jade Ellis 2025-04-20 19:30:02 +01:00
parent 5486dbda24
commit 2d9bdc0979
No known key found for this signature in database
GPG key ID: 8705A2A3EBF77BD2
12 changed files with 238 additions and 166 deletions

View file

@ -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
View 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
View 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"
]
}