[del] api-actions "email", "verification_check", "verification_get"
This commit is contained in:
parent
f9f3ad8463
commit
7743d513e4
4 changed files with 0 additions and 170 deletions
|
@ -1,70 +0,0 @@
|
||||||
namespace _espe.api
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function register_email(
|
|
||||||
rest_subject : lib_plankton.rest.type_rest
|
|
||||||
) : void
|
|
||||||
{
|
|
||||||
lib_plankton.rest.register<
|
|
||||||
{
|
|
||||||
receivers : Array<string>;
|
|
||||||
subject : string;
|
|
||||||
content : string;
|
|
||||||
},
|
|
||||||
null
|
|
||||||
>(
|
|
||||||
rest_subject,
|
|
||||||
lib_plankton.http.enum_method.post,
|
|
||||||
_espe.conf.get().server.path_base + "/email",
|
|
||||||
{
|
|
||||||
"description": "sendet eine E-Mail",
|
|
||||||
"input_schema": () => ({
|
|
||||||
"type": "object",
|
|
||||||
"nullable": false,
|
|
||||||
"properties": {
|
|
||||||
"receivers": {
|
|
||||||
"type": "array",
|
|
||||||
"nullable": false,
|
|
||||||
"items": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": false,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"subject": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": false,
|
|
||||||
},
|
|
||||||
"content": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"receivers",
|
|
||||||
"subject",
|
|
||||||
"content",
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
"output_schema": () => ({
|
|
||||||
"nullable": true,
|
|
||||||
}),
|
|
||||||
"restriction": restriction_logged_in,
|
|
||||||
"execution": async ({"input": input}) => {
|
|
||||||
await _espe.helpers.email_send(
|
|
||||||
input.receivers,
|
|
||||||
input.subject,
|
|
||||||
input.content
|
|
||||||
);
|
|
||||||
return Promise.resolve({
|
|
||||||
"status_code": 200,
|
|
||||||
"data": null,
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,49 +0,0 @@
|
||||||
namespace _espe.api
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
export function register_verification_check(
|
|
||||||
rest_subject : lib_plankton.rest.type_rest
|
|
||||||
) : void
|
|
||||||
{
|
|
||||||
lib_plankton.rest.register<{data : any; verification : string;}, boolean>(
|
|
||||||
rest_subject,
|
|
||||||
lib_plankton.http.enum_method.post,
|
|
||||||
_espe.conf.get().server.path_base + "/verification/check",
|
|
||||||
{
|
|
||||||
"description": "untersucht ob ein Prüfwert zu einer Eingabe passt",
|
|
||||||
"input_schema": () => ({
|
|
||||||
"type": "object",
|
|
||||||
"nullable": true,
|
|
||||||
"properties": {
|
|
||||||
"data": {
|
|
||||||
"nullable": true
|
|
||||||
},
|
|
||||||
"verification": {
|
|
||||||
"type": "string",
|
|
||||||
"nullable": false
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"additionalProperties": false,
|
|
||||||
"required": [
|
|
||||||
"input",
|
|
||||||
"verification",
|
|
||||||
]
|
|
||||||
}),
|
|
||||||
"output_schema": () => ({
|
|
||||||
"type": "boolean",
|
|
||||||
"nullable": false,
|
|
||||||
}),
|
|
||||||
"restriction": restriction_none,
|
|
||||||
"execution": async ({"input": input}) => {
|
|
||||||
return Promise.resolve({
|
|
||||||
"status_code": 200,
|
|
||||||
"data": await _espe.helpers.verification_check(input.data, input.verification),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,44 +0,0 @@
|
||||||
namespace _espe.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,
|
|
||||||
_espe.conf.get().server.path_base + "/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 _espe.helpers.verification_get(input.data),
|
|
||||||
});
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -2,7 +2,6 @@ namespace _espe.api
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @todo narrow conf
|
|
||||||
*/
|
*/
|
||||||
export function make(
|
export function make(
|
||||||
) : lib_plankton.rest.type_rest
|
) : lib_plankton.rest.type_rest
|
||||||
|
@ -24,12 +23,6 @@ namespace _espe.api
|
||||||
_espe.api.register_session_begin(rest_subject);
|
_espe.api.register_session_begin(rest_subject);
|
||||||
_espe.api.register_session_end(rest_subject);
|
_espe.api.register_session_end(rest_subject);
|
||||||
}
|
}
|
||||||
// _espe.api.register_email(rest_subject);
|
|
||||||
// verification
|
|
||||||
{
|
|
||||||
// _espe.api.register_verification_get(rest_subject);
|
|
||||||
// _espe.api.register_verification_check(rest_subject);
|
|
||||||
}
|
|
||||||
// member
|
// member
|
||||||
{
|
{
|
||||||
_espe.api.register_member_project(rest_subject);
|
_espe.api.register_member_project(rest_subject);
|
||||||
|
|
Loading…
Add table
Reference in a new issue