Notes/src/public/app/services/attributes.js

19 lines
402 B
JavaScript
Raw Normal View History

2020-10-23 00:11:44 +02:00
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
}