mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 22:09:16 +01:00
feat(api): ✨ Put the correct lysand version everywhere, add a new lysand_version field in the instance metadata endpoints
This commit is contained in:
parent
03750d5e86
commit
50ea9461e2
4 changed files with 8 additions and 4 deletions
34
server/api/well-known/nodeinfo/2.0/index.ts
Normal file
34
server/api/well-known/nodeinfo/2.0/index.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { apiRoute, applyConfig } from "@api";
|
||||
import { jsonResponse } from "@response";
|
||||
import manifest from "~package.json";
|
||||
|
||||
export const meta = applyConfig({
|
||||
allowedMethods: ["GET"],
|
||||
auth: {
|
||||
required: false,
|
||||
},
|
||||
ratelimits: {
|
||||
duration: 60,
|
||||
max: 500,
|
||||
},
|
||||
route: "/.well-known/nodeinfo/2.0",
|
||||
});
|
||||
|
||||
/**
|
||||
* ActivityPub nodeinfo 2.0 endpoint
|
||||
*/
|
||||
export default apiRoute(() => {
|
||||
// TODO: Implement this
|
||||
return jsonResponse({
|
||||
version: "2.0",
|
||||
software: { name: "lysand", version: manifest.version },
|
||||
protocols: ["lysand"],
|
||||
services: { outbound: [], inbound: [] },
|
||||
usage: {
|
||||
users: { total: 0, activeMonth: 0, activeHalfyear: 0 },
|
||||
localPosts: 0,
|
||||
},
|
||||
openRegistrations: false,
|
||||
metadata: {},
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue