-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
288 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/backend/db/migrations/2_add-uniqueness-constraint-on-tasks.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
-- Each task should have a unique subgoal_id - assignee_id combination | ||
-- which corresponds to a unique benchmark / para combo | ||
ALTER TABLE task | ||
ADD CONSTRAINT subgoal_assignee_unique UNIQUE (subgoal_id, assignee_id); | ||
|
||
-- Add index to allow easy queries of tasks by assignee | ||
CREATE INDEX idx_task_assignee ON task(assignee_id); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
import { createTransport } from "nodemailer"; | ||
import SMTPTransport from "nodemailer/lib/smtp-transport"; | ||
import { Env } from "./types"; | ||
|
||
export const getTransporter = (environment: Env) => | ||
createTransport({ | ||
service: "gmail", | ||
export const getTransporter = (env: Env) => { | ||
const options: SMTPTransport.Options = { | ||
service: env.EMAIL_SERVICE, | ||
auth: { | ||
user: environment.EMAIL, | ||
pass: environment.EMAIL_PASS, | ||
user: env.EMAIL_AUTH_USER, | ||
pass: env.EMAIL_AUTH_PASS, | ||
}, | ||
}); | ||
}; | ||
if (env.EMAIL_SERVICE === "smtp") { | ||
options.host = env.EMAIL_HOST; | ||
options.port = parseInt(env.EMAIL_PORT, 10); | ||
} | ||
return createTransport(options); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.