-
Notifications
You must be signed in to change notification settings - Fork 836
Move over relations to emailAccount #412
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
184 commits
Select commit
Hold shift + click to select a range
d4e072d
move over relations to emailaccount
elie222 fbd844a
more fixes
elie222 33a7413
move over more code
elie222 5d34941
move over more relations
elie222 5e6659c
more move overs
elie222 4de18e3
more
elie222 2fc3424
move over more
elie222 9d9a255
user email or
elie222 5dcef89
move over more relations
elie222 d9e4ab5
move remaning multi accounts over
elie222 066425a
account switcher ui
elie222 716ed96
update cursor rules
elie222 653f533
add account fetch hook
elie222 609e433
show accounts
elie222 f0c3f4c
fix mobile switcher
elie222 d61b90f
symbol
elie222 82824c8
keyboard shortcut switcher
elie222 142178d
fix modifier crash
elie222 fe9d943
add account link
elie222 2a3793a
Merge branch 'main' into multi-email
elie222 82edcf5
use account hook
elie222 77d181f
use account hook
elie222 021713a
clean up useaccount
elie222 6d1ed9d
add withauth middleware
elie222 86a2c83
fix nuqs
elie222 3fc590b
withauth
elie222 96306d5
add next safe action
elie222 f34b96d
move user actions to next safe action
elie222 c41e7c2
account provider
elie222 6da9772
fix email account cache
elie222 2992b52
Merge branch 'main' into multi-email
elie222 97f9592
safe action for whitelist and webhook
elie222 0a34846
safe action unsubscriber
elie222 c57deb8
Merge branch 'main' into multi-email
elie222 6db8e74
rule action
elie222 8d4cc34
reply tracking action
elie222 d46df21
premium action
elie222 c94615c
permissions action
elie222 bd5e23b
mail and knowledge actions
elie222 6e7244c
move more to next safe action
elie222 4c1beaf
admin action client
elie222 2fdddcc
action client
elie222 364c12a
clean action
elie222 136f0d9
cold email action
elie222 25dc89f
last move over
elie222 1049cbc
webhook
elie222 173d94f
assess
elie222 7066a6c
admin
elie222 77807d3
report mistake
elie222 4622fa6
rules
elie222 60c4984
clean up
elie222 225e8e4
fix up actions
elie222 6f49c26
reply tracker action
elie222 4b4a66a
clean up use account email
elie222 dc967c8
unsub action
elie222 83a7c3d
actions
elie222 efc7163
remove usesessions
elie222 d8ad19a
fix
elie222 8284f4a
More fixes
elie222 780112d
fix
elie222 83c7311
fix
elie222 a4ff35f
fix
elie222 a38b813
next safe action
elie222 109de9f
remove isactionerror
elie222 6cff1a7
fix infinite loop
elie222 2c8e8c0
add account id to path
elie222 91ec7f8
move over more to email support
elie222 77f7566
move over more email
elie222 e3a5850
more fixes
elie222 c101290
fix more user email
elie222 fc23663
update mdcs
elie222 156adb7
snippets
elie222 3bf5fdf
Merge branch 'main' into multi-email
elie222 cef50c3
fix params
elie222 e13a32e
mid way through massive refactor
elie222 2f2c88a
more fixes
elie222 ead9ec5
more fixes
elie222 6447aea
more fixes
elie222 661d906
adjustments to gmail client
elie222 941a695
clean up
elie222 f0d9338
more fixes
elie222 d5bb166
more fixes
elie222 44aff84
fixes
elie222 da327c5
fix tests
elie222 22dd981
fix ts
elie222 ed25c5a
fixes
elie222 a32013e
fixes
elie222 865fc6f
more fixes
elie222 a078093
emailAccountId fixes
elie222 c8725c1
fixes
elie222 421a285
fixes
elie222 8dc4403
fix
elie222 2204809
Merge branch 'main' into multi-email
elie222 e0c31b2
fix tests
elie222 827b465
Merge branch 'main' into multi-email
elie222 f5fb0b0
fix tests
elie222 7bfcfba
fixes
elie222 6350a27
fixes
elie222 cf86300
fix provider
elie222 45d7a44
redirect
elie222 7073da8
email fixes
elie222 1be5045
fix automation paths
elie222 cdc255c
more path fixes. move premium to global
elie222 6c6baa9
path
elie222 6c85ac7
unused imports
elie222 6b68667
refactor old tinybird files
elie222 524da95
fix useuser useemailaccount
elie222 a0bcb7d
path fixes
elie222 77cdeec
fix fetch email accounts
elie222 78b94d9
delete old code
elie222 80e533e
move post to action
elie222 6151322
settings post => action
elie222 4ee408a
move over email stats to action
elie222 e94f483
fix build
elie222 8487e59
clean up
elie222 b3e4cd7
fix actions
elie222 381368f
fix action
elie222 8550ba8
add api middleware tests
elie222 7e1b46c
clean up test
elie222 618e3ce
test for isadmin
elie222 a4c1081
adjust server action rule
elie222 534b012
clean up
elie222 03ca109
remove handled todo
elie222 a7621ae
safer oss page
elie222 6a2f9fa
remove unused api.ts file
elie222 b504c2a
fetch with account
elie222 4bf4637
path prefix for router push
elie222 22b63dd
tighter sidebar
elie222 3f5f57f
mdc update
elie222 0cc49d7
redirects
elie222 217959a
delete old pages
elie222 3288299
add account page
elie222 58b76c2
email account name and image
elie222 bba8cf4
fix account switcher name/image
elie222 c43a0da
link account
elie222 184e760
basic accounts page
elie222 995556d
delete account action
elie222 bb63391
fix side links
elie222 8bd0411
fix drop down nav
elie222 67bf8ed
side nav
elie222 0813f71
logs. show account switcher
elie222 2e72877
accounts pgae
elie222 a3bc962
fix up accounts
elie222 8023ecb
remove add accounts page
elie222 1caec3e
fix delete
elie222 9e26a9f
dont delete primary email account
elie222 d44ccf1
delete email account fix
elie222 c39ac98
cascade delete
elie222 3cd990f
adjust copy
elie222 318b265
show email in account switcher
elie222 69997f4
remove logs
elie222 f46f5cd
throw access token error
elie222 c3be7e2
better log
elie222 20b6870
clean up old user.email usage
elie222 74d8cfa
encrypt token. use gmail refresh
elie222 529f001
clean up gmail client
elie222 4793b03
handle premium for extra email accounts
elie222 a25c2d9
migrate data. keep user ids intact for now
elie222 8defc3c
move data from email account back to user
elie222 52721a9
permissions check fix
elie222 abd46f0
remove deprecated userids
elie222 fc0c71c
split up email and user settings
elie222 4616b21
default provider instead of anthropic
elie222 dd797ef
fix up settings
elie222 13e3013
fix build
elie222 904f179
Add account confirm dialog
elie222 f91ead3
remove crypto file
elie222 547f8a4
better security
elie222 2d60d25
fix cold email get
elie222 65b0b40
use prefix path. fix more links
elie222 d1dcff8
remove server fetching for settings page
elie222 b63be38
revalidate fixes
elie222 0e12281
fix settings bug
elie222 b9cdc6b
fix tests
elie222 0ac9cfe
merge accounts
elie222 fd91dd6
fix up account switcher
elie222 968cecb
adjust top right
elie222 b9beb3c
Merge branch 'main' into multi-email
elie222 2935b63
fIx build
elie222 c69ee5a
better error log
elie222 8391820
redirect to consent if no token
elie222 535b120
captureException
elie222 ff76e90
perf
elie222 8493d29
Merge branch 'main' into multi-email
elie222 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,20 +1,20 @@ | ||
import prisma from "utils/prisma"; | ||
|
||
export async function getJobById({ | ||
userId, | ||
email, | ||
jobId, | ||
}: { | ||
userId: string; | ||
email: string; | ||
jobId: string; | ||
}) { | ||
return await prisma.cleanupJob.findUnique({ | ||
where: { id: jobId, userId }, | ||
where: { id: jobId, email }, | ||
}); | ||
} | ||
|
||
export async function getLastJob(userId: string) { | ||
export async function getLastJob({ email }: { email: string }) { | ||
return await prisma.cleanupJob.findFirst({ | ||
where: { userId }, | ||
where: { email }, | ||
orderBy: { createdAt: "desc" }, | ||
}); | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.