mirror of
https://github.com/detleph/server.git
synced 2026-09-04 16:46:04 +02:00
Restructure the process of changing a password
+ Requests are now dispatched to the according user ressource, not the collection + The current user can be referenced by setting the pid to 'current' + Refactored the error logic
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
export enum DataType {
|
||||
STRING = "string",
|
||||
NUMBER = "number",
|
||||
INTEGER = "integer",
|
||||
PERMISSION_LEVEL = "'ELEVATED' | 'STANDARD'",
|
||||
}
|
||||
|
||||
interface Body {
|
||||
[k: string]: DataType;
|
||||
}
|
||||
|
||||
export function generateInvalidBodyError(body: Body) {
|
||||
return {
|
||||
type: "error",
|
||||
payload: {
|
||||
message: "The body of your request did not conform to the requirements",
|
||||
schema: { body },
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user