mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Don't wrap text in nav (#4035)
* Move v-list-item-text to v-text-overflow, use in tables * Fix type issue
This commit is contained in:
@@ -150,9 +150,7 @@ router.patch(
|
||||
);
|
||||
|
||||
const updateSchema = Joi.object({
|
||||
type: Joi.string()
|
||||
.valid(...types)
|
||||
.required(),
|
||||
type: Joi.string().valid(...types),
|
||||
schema: Joi.object({
|
||||
default_value: Joi.any(),
|
||||
max_length: [Joi.number(), Joi.string(), Joi.valid(null)],
|
||||
@@ -176,6 +174,10 @@ router.patch(
|
||||
throw new InvalidPayloadException(error.message);
|
||||
}
|
||||
|
||||
if (req.body.schema && !req.body.type) {
|
||||
throw new InvalidPayloadException(`You need to provide "type" when providing "schema".`);
|
||||
}
|
||||
|
||||
const fieldData: Partial<Field> & { field: string; type: typeof types[number] } = req.body;
|
||||
|
||||
if (!fieldData.field) fieldData.field = req.params.field;
|
||||
|
||||
Reference in New Issue
Block a user