aboutsummaryrefslogtreecommitdiff
path: root/src/background/repositories/BookmarkRepository.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-05-02 17:25:56 +0900
committerGitHub <noreply@github.com>2020-05-02 17:25:56 +0900
commit5df0537bcf65a341e79852b1b30379c73318529c (patch)
treeaee5efe52412855f620cb514a13a2c14373f27b7 /src/background/repositories/BookmarkRepository.ts
parent685f2b7b69218b06b5bb676069e35f79c5048c9b (diff)
parent75abd90ecb8201ad845b266f96220d8adfe19b2d (diff)
Merge pull request #749 from ueokande/qa-0.28
QA 0.28
Diffstat (limited to 'src/background/repositories/BookmarkRepository.ts')
-rw-r--r--src/background/repositories/BookmarkRepository.ts9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/background/repositories/BookmarkRepository.ts b/src/background/repositories/BookmarkRepository.ts
index 0d2a1fc..e6e55c9 100644
--- a/src/background/repositories/BookmarkRepository.ts
+++ b/src/background/repositories/BookmarkRepository.ts
@@ -1,17 +1,18 @@
-import { injectable } from 'tsyringe';
+import { injectable } from "tsyringe";
@injectable()
export default class BookmarkRepository {
async create(
- title: string, url: string
+ title: string,
+ url: string
): Promise<browser.bookmarks.BookmarkTreeNode> {
const item = await browser.bookmarks.create({
- type: 'bookmark',
+ type: "bookmark",
title,
url,
});
if (!item) {
- throw new Error('Could not create a bookmark');
+ throw new Error("Could not create a bookmark");
}
return item;
}