mirror of
https://github.com/zadam/trilium.git
synced 2025-01-15 19:51:57 +08:00
Merge pull request #3908 from mm21/etapi-attribute-position
Allow etapi to update attribute fields isInheritable, position
This commit is contained in:
commit
aa8c0fdad8
1 changed files with 4 additions and 2 deletions
|
@ -17,7 +17,8 @@ function register(router) {
|
|||
'type': [v.mandatory, v.notNull, v.isAttributeType],
|
||||
'name': [v.mandatory, v.notNull, v.isString],
|
||||
'value': [v.notNull, v.isString],
|
||||
'isInheritable': [v.notNull, v.isBoolean]
|
||||
'isInheritable': [v.notNull, v.isBoolean],
|
||||
'position': [v.notNull, v.isInteger]
|
||||
};
|
||||
|
||||
eu.route(router, 'post' ,'/etapi/attributes', (req, res, next) => {
|
||||
|
@ -40,7 +41,8 @@ function register(router) {
|
|||
});
|
||||
|
||||
const ALLOWED_PROPERTIES_FOR_PATCH = {
|
||||
'value': [v.notNull, v.isString]
|
||||
'value': [v.notNull, v.isString],
|
||||
'position': [v.notNull, v.isInteger]
|
||||
};
|
||||
|
||||
eu.route(router, 'patch' ,'/etapi/attributes/:attributeId', (req, res, next) => {
|
||||
|
|
Loading…
Reference in a new issue