Skip to content

Commit

Permalink
style: formating the code
Browse files Browse the repository at this point in the history
  • Loading branch information
vwh committed Nov 22, 2024
1 parent d695c87 commit 98830d3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/app/api/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ export default function Component() {
<ul className="list-inside list-disc text-sm text-foreground/80">
<li>email (string): The email address to fetch messages for</li>
</ul>
<h2 className="text-md font-semibold text-primary">Example response</h2>
<h2 className="text-md font-semibold text-primary">
Example response
</h2>
<div className="overflow-x-auto rounded bg-primary/5 p-2">
<pre className="text-sm text-foreground/80">
{`[
Expand Down
6 changes: 2 additions & 4 deletions src/database/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function insertEmail(
// Insert email addresses
const recipientGroups = [
{ type: "from", values: emailData.from?.value || [] },
{ type: "to", values: emailData.to?.value || [] },
{ type: "to", values: emailData.to?.value || [] }
];

for (const { type, values } of recipientGroups) {
Expand All @@ -52,9 +52,7 @@ export function insertEmail(
}

// Insert inbox entries
const allRecipients = [
...(emailData.to?.value || []),
];
const allRecipients = [...(emailData.to?.value || [])];

for (const recipient of allRecipients) {
insertInbox.run(
Expand Down
2 changes: 1 addition & 1 deletion src/database/statements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const SQL_STATEMENTS = {
);
`,

CREATE_INDEX: `
CREATE_INDEX: `
CREATE INDEX IF NOT EXISTS idx_email_id ON EmailAddress(emailId);
CREATE INDEX IF NOT EXISTS idx_inbox_address ON Inbox(address);
`,
Expand Down

0 comments on commit 98830d3

Please sign in to comment.