mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 06:31:35 +08: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
|
||
|
}
|