[wip] implement command usecases
This commit is contained in:
parent
0846587baf
commit
c4afd7237b
10 changed files with 291 additions and 49 deletions
13
src/background/repositories/bookmark.js
Normal file
13
src/background/repositories/bookmark.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
export default class BookmarkRepository {
|
||||
async create(title, url) {
|
||||
let item = await browser.bookmarks.create({
|
||||
type: 'bookmark',
|
||||
title,
|
||||
url,
|
||||
});
|
||||
if (!item) {
|
||||
throw new Error('Could not create a bookmark');
|
||||
}
|
||||
return item;
|
||||
}
|
||||
}
|
Reference in a new issue