37 lines
755 B
TypeScript
37 lines
755 B
TypeScript
![]() |
|
||
|
namespace _zeitbild.api
|
||
|
{
|
||
|
|
||
|
/**
|
||
|
*/
|
||
|
export function register_session_oidc(
|
||
|
rest_subject : lib_plankton.rest.type_rest
|
||
|
) : void
|
||
|
{
|
||
|
register<null, null>(
|
||
|
rest_subject,
|
||
|
lib_plankton.http.enum_method.delete,
|
||
|
"/session/oidc",
|
||
|
{
|
||
|
"description": "beendet eine Sitzung",
|
||
|
"input_schema": () => ({
|
||
|
"type": "null",
|
||
|
}),
|
||
|
"output_schema": () => ({
|
||
|
"type": "null",
|
||
|
}),
|
||
|
"restriction": restriction_logged_in,
|
||
|
"execution": async (stuff) => {
|
||
|
const session : {key : string; value : lib_plankton.session.type_session} = await session_from_stuff(stuff);
|
||
|
await lib_plankton.session.end(session.key);
|
||
|
return Promise.resolve({
|
||
|
"status_code": 200,
|
||
|
"data": null,
|
||
|
});
|
||
|
},
|
||
|
}
|
||
|
);
|
||
|
}
|
||
|
|
||
|
}
|