2024-03-10 23:48:14 +01:00
|
|
|
import { apiRoute, applyConfig } from "@api";
|
2023-09-13 07:30:45 +02:00
|
|
|
import { jsonResponse } from "@response";
|
2024-04-26 03:57:57 +02:00
|
|
|
import manifest from "~package.json";
|
2023-09-13 07:30:45 +02:00
|
|
|
|
2023-10-16 19:39:41 +02:00
|
|
|
export const meta = applyConfig({
|
2024-04-07 07:30:49 +02:00
|
|
|
allowedMethods: ["GET"],
|
|
|
|
|
auth: {
|
|
|
|
|
required: false,
|
|
|
|
|
},
|
|
|
|
|
ratelimits: {
|
|
|
|
|
duration: 60,
|
|
|
|
|
max: 500,
|
|
|
|
|
},
|
2024-04-26 03:57:57 +02:00
|
|
|
route: "/.well-known/nodeinfo/2.0",
|
2023-10-16 19:39:41 +02:00
|
|
|
});
|
|
|
|
|
|
2023-09-13 07:30:45 +02:00
|
|
|
/**
|
|
|
|
|
* ActivityPub nodeinfo 2.0 endpoint
|
|
|
|
|
*/
|
2024-03-10 23:48:14 +01:00
|
|
|
export default apiRoute(() => {
|
2024-04-07 07:30:49 +02:00
|
|
|
// TODO: Implement this
|
|
|
|
|
return jsonResponse({
|
|
|
|
|
version: "2.0",
|
2024-04-26 03:57:57 +02:00
|
|
|
software: { name: "lysand", version: manifest.version },
|
|
|
|
|
protocols: ["lysand"],
|
2024-04-07 07:30:49 +02:00
|
|
|
services: { outbound: [], inbound: [] },
|
|
|
|
|
usage: {
|
|
|
|
|
users: { total: 0, activeMonth: 0, activeHalfyear: 0 },
|
|
|
|
|
localPosts: 0,
|
|
|
|
|
},
|
|
|
|
|
openRegistrations: false,
|
|
|
|
|
metadata: {},
|
|
|
|
|
});
|
2024-03-10 23:48:14 +01:00
|
|
|
});
|