Fix marks in user_schema

This commit is contained in:
Leon Meier 2025-02-20 21:30:39 +01:00
parent d75e5b1f11
commit cd8d0bc497

View File

@ -19,13 +19,13 @@ const schema_get = validator
})
.nand('id', 'search'); // Allow id or search. not both.
// MARK: CREATE alertContact
// MARK: CREATE user
const schema_post = validator.object({
name: validator.string().min(1).max(32).required(),
code: validator.string().min(4).max(4).trim().regex(new RegExp('/^[0-9]+$/'))
});
// MARK: UPDATE alertContact
// MARK: UPDATE user
const schema_patch = validator
.object({
id: validator.number().positive().precision(0).required(),
@ -34,7 +34,7 @@ const schema_patch = validator
})
.or('name', 'code');
// MARK: DELETE alertContact
// MARK: DELETE user
const schema_del = validator.object({
id: validator.number().positive().precision(0).required()
});