Skip to content

Commit

Permalink
fix: Fix browser bookmarking input schema
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedBassem committed Feb 29, 2024
1 parent 2ca29af commit 9b7f9c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
8 changes: 5 additions & 3 deletions packages/browser-extension/src/SavePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,18 @@ export default function SavePage({ settings }: { settings: Settings }) {

try {
const resp = await fetch(
`${settings.address}/api/trpc/bookmarks.bookmarkLink`,
`${settings.address}/api/trpc/bookmarks.createBookmark`,
{
method: "POST",
headers: {
Authorization: `Bearer ${settings.apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "link",
url: currentUrl,
json: {
type: "link",
url: currentUrl,
},
}),
},
);
Expand Down
13 changes: 5 additions & 8 deletions packages/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,9 @@ export const tagsOnBookmarksRelations = relations(
}),
);

export const apiKeyRelations = relations(
apiKeys,
({ one }) => ({
user: one(users, {
fields: [apiKeys.userId],
references: [users.id],
}),
export const apiKeyRelations = relations(apiKeys, ({ one }) => ({
user: one(users, {
fields: [apiKeys.userId],
references: [users.id],
}),
);
}));

0 comments on commit 9b7f9c1

Please sign in to comment.