backend/source/api/actions/meta_ping.ts

41 lines
744 B
TypeScript
Raw Normal View History

2024-09-12 00:03:29 +02:00
namespace _zeitbild.api
{
/**
*/
export function register_meta_ping(
2024-10-30 07:20:13 +01:00
rest_subject : lib_plankton.rest_caldav.type_rest
2024-09-12 00:03:29 +02:00
) : void
{
2024-10-30 07:20:13 +01:00
lib_plankton.rest_caldav.register<
2024-09-12 00:03:29 +02:00
null,
string
>
(
rest_subject,
lib_plankton.http.enum_method.get,
_zeitbild.conf.get().server.path_base + "/meta/ping",
{
"description": "sendet ein 'pong' zurück; gedacht um die Erreichbarkeit des Backends zu prüfen",
"input_schema": () => ({
"nullable": true,
}),
"output_schema": () => ({
"nullable": false,
"type": "string",
}),
"restriction": restriction_none,
"execution": () => {
return Promise.resolve({
"status_code": 200,
"data": "pong",
});
},
}
);
}
}