[wip] implement command usecases

This commit is contained in:
Shin'ya Ueoka 2018-07-23 21:26:47 +09:00
parent 0846587baf
commit c4afd7237b
10 changed files with 291 additions and 49 deletions

View 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;
}
}