mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 03:46:37 +01:00
19 lines
402 B
JavaScript
19 lines
402 B
JavaScript
|
|
import server from './server.js';
|
||
|
|
|
||
|
|
async function addLabel(noteId, name, value = "") {
|
||
|
|
await server.put(`notes/${noteId}/attribute`, {
|
||
|
|
type: 'label',
|
||
|
|
name: name,
|
||
|
|
value: value
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
async function removeAttributeById(noteId, attributeId) {
|
||
|
|
await server.remove(`notes/${noteId}/attributes/${attributeId}`);
|
||
|
|
}
|
||
|
|
|
||
|
|
export default {
|
||
|
|
addLabel,
|
||
|
|
removeAttributeById
|
||
|
|
}
|