mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 08:28:19 +01:00
32 lines
844 B
TypeScript
32 lines
844 B
TypeScript
import { apiRoute, applyConfig } from "@/api";
|
|
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",
|
|
});
|
|
|
|
export default apiRoute((app) =>
|
|
app.on(meta.allowedMethods, meta.route, (context) => {
|
|
return context.json({
|
|
version: "2.0",
|
|
software: { name: "versia-server", version: manifest.version },
|
|
protocols: ["versia"],
|
|
services: { outbound: [], inbound: [] },
|
|
usage: {
|
|
users: { total: 0, activeMonth: 0, activeHalfyear: 0 },
|
|
localPosts: 0,
|
|
},
|
|
openRegistrations: false,
|
|
metadata: {},
|
|
});
|
|
}),
|
|
);
|