mirror of
https://github.com/versia-pub/server.git
synced 2025-12-06 16:38:19 +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
|
|
@ -116,6 +116,7 @@ export default apiRoute(async (req, matchedRoute, extraData) => {
|
|||
streaming_api: "",
|
||||
},
|
||||
version: "4.3.0-alpha.3+glitch",
|
||||
lysand_version: version,
|
||||
pleroma: {
|
||||
metadata: {
|
||||
account_activation_required: false,
|
||||
|
|
@ -188,6 +189,7 @@ export default apiRoute(async (req, matchedRoute, extraData) => {
|
|||
contact_account: contactAccount?.toAPI() || undefined,
|
||||
} satisfies APIInstance & {
|
||||
banner: string;
|
||||
lysand_version: string;
|
||||
pleroma: object;
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ export default apiRoute(async (req, matchedRoute, extraData) => {
|
|||
domain: new URL(config.http.base_url).hostname,
|
||||
title: config.instance.name,
|
||||
version: "4.3.0-alpha.3+glitch",
|
||||
lysand_version: version,
|
||||
source_url: "https://github.com/lysand-org/lysand",
|
||||
description: config.instance.description,
|
||||
usage: {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import { apiRoute, applyConfig } from "@api";
|
|||
import { urlToContentFormat } from "@content_types";
|
||||
import { jsonResponse } from "@response";
|
||||
import type * as Lysand from "lysand-types";
|
||||
import pkg from "../../../package.json";
|
||||
import pkg from "~package.json";
|
||||
|
||||
export const meta = applyConfig({
|
||||
allowedMethods: ["GET"],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import { apiRoute, applyConfig } from "@api";
|
||||
import { jsonResponse } from "@response";
|
||||
import manifest from "~package.json";
|
||||
|
||||
export const meta = applyConfig({
|
||||
allowedMethods: ["GET"],
|
||||
|
|
@ -10,7 +11,7 @@ export const meta = applyConfig({
|
|||
duration: 60,
|
||||
max: 500,
|
||||
},
|
||||
route: "/nodeinfo/2.0",
|
||||
route: "/.well-known/nodeinfo/2.0",
|
||||
});
|
||||
|
||||
/**
|
||||
|
|
@ -20,8 +21,8 @@ export default apiRoute(() => {
|
|||
// TODO: Implement this
|
||||
return jsonResponse({
|
||||
version: "2.0",
|
||||
software: { name: "lysand", version: "0.0.1" },
|
||||
protocols: ["activitypub"],
|
||||
software: { name: "lysand", version: manifest.version },
|
||||
protocols: ["lysand"],
|
||||
services: { outbound: [], inbound: [] },
|
||||
usage: {
|
||||
users: { total: 0, activeMonth: 0, activeHalfyear: 0 },
|
||||
Loading…
Reference in a new issue