50 lines
831 B
TypeScript
50 lines
831 B
TypeScript
|
|
namespace _zeitbild.api
|
|
{
|
|
|
|
/**
|
|
*/
|
|
export function register_calendar_list(
|
|
rest_subject : lib_plankton.rest.type_rest
|
|
) : void
|
|
{
|
|
register<
|
|
{
|
|
name : string;
|
|
public : boolean;
|
|
members : Array<
|
|
{
|
|
user_id : user_id;
|
|
role : role;
|
|
}
|
|
>;
|
|
resource_id : resource_id;
|
|
},
|
|
int
|
|
>(
|
|
rest_subject,
|
|
lib_plankton.http.enum_method.post,
|
|
"/calendar/add",
|
|
{
|
|
"description": "erstellt einen Kalender",
|
|
"output_schema": () => ({
|
|
"nullable": true,
|
|
"type": "integer",
|
|
}),
|
|
"restriction": restriction_logged_in,
|
|
"execution": async (stuff) => {
|
|
return (
|
|
_zeitbild.service.calendar.overview(user_id)
|
|
.then(
|
|
data => Promise.resolve({
|
|
"status_code": 200,
|
|
"data": data,
|
|
})
|
|
)
|
|
);
|
|
}
|
|
}
|
|
);
|
|
}
|
|
|
|
}
|