44 lines
914 B
TypeScript
44 lines
914 B
TypeScript
namespace _aum.api
|
|
{
|
|
|
|
/**
|
|
*/
|
|
export function register_verification_get(
|
|
rest_subject : lib_plankton.rest.type_rest
|
|
) : void
|
|
{
|
|
lib_plankton.rest.register<{data : any;}, string>(
|
|
rest_subject,
|
|
lib_plankton.http.enum_method.post,
|
|
"/verification/get",
|
|
{
|
|
"description": "berechnet einen Prüfwert auf Basis eines Geheimnisses",
|
|
"input_schema": () => ({
|
|
"type": "object",
|
|
"nullable": true,
|
|
"properties": {
|
|
"data": {
|
|
"nullable": true
|
|
},
|
|
},
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"input",
|
|
]
|
|
}),
|
|
"output_schema": () => ({
|
|
"type": "string",
|
|
"nullable": false,
|
|
}),
|
|
"restriction": restriction_logged_in,
|
|
"execution": async ({"input": input}) => {
|
|
return Promise.resolve({
|
|
"status_code": 200,
|
|
"data": await _aum.helpers.verification_get(input.data),
|
|
});
|
|
},
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|