This repository was archived by the owner on Sep 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Expand file tree Collapse file tree 7 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export async function run(
1717) : Promise < Response > {
1818 await ctx . modules . rateLimit . throttlePublic ( { } ) ;
1919
20- if ( ! ctx . userConfig . email ) throw new RuntimeError ( "provider_disabled" ) ;
20+ if ( ! ctx . config . email ) throw new RuntimeError ( "provider_disabled" ) ;
2121
2222 // Check if the email is already associated with an identity
2323 const existingIdentity = await ctx . db . emailPasswordless . findFirst ( {
@@ -57,8 +57,8 @@ export async function run(
5757 // Send email
5858 await ctx . modules . email . sendEmail ( {
5959 from : {
60- email : ctx . userConfig . email . fromEmail ?? "hello@test.com" ,
61- name : ctx . userConfig . email . fromName ?? "Authentication Code" ,
60+ email : ctx . config . email . fromEmail ?? "hello@test.com" ,
61+ name : ctx . config . email . fromName ?? "Authentication Code" ,
6262 } ,
6363 to : [ { email : req . email } ] ,
6464 subject : "Your verification code" ,
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ export async function run(
2525 throw new RuntimeError ( "email_missing_content" ) ;
2626 }
2727
28- if ( "test" in ctx . userConfig . provider ) {
28+ if ( "test" in ctx . config . provider ) {
2929 // Do nothing
30- } else if ( "sendGrid" in ctx . userConfig . provider ) {
31- await useSendGrid ( ctx . userConfig . provider . sendGrid , req ) ;
30+ } else if ( "sendGrid" in ctx . config . provider ) {
31+ await useSendGrid ( ctx . config . provider . sendGrid , req ) ;
3232 } else {
3333 throw new RuntimeError ( "unreachable" ) ;
3434 }
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export async function run(
1919 ctx : ScriptContext ,
2020 req : Request ,
2121) : Promise < Response > {
22- const config = getConfig ( ctx . userConfig ) ;
22+ const config = getConfig ( ctx . config ) ;
2323
2424 const newUpload = await ctx . db . $transaction ( async ( db ) => {
2525 // Find the upload by ID
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export async function run(
1515 ctx : ScriptContext ,
1616 req : Request ,
1717) : Promise < Response > {
18- const config = getConfig ( ctx . userConfig ) ;
18+ const config = getConfig ( ctx . config ) ;
1919
2020 const bytesDeleted = await ctx . db . $transaction ( async ( db ) => {
2121 const upload = await db . upload . findFirst ( {
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export async function run(
1919 ctx : ScriptContext ,
2020 req : Request ,
2121) : Promise < Response > {
22- getConfig ( ctx . userConfig ) ;
22+ getConfig ( ctx . config ) ;
2323
2424 // Find uploads that match the IDs in the request
2525 const dbUploads = await ctx . db . upload . findMany ( {
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ export async function run(
1717 ctx : ScriptContext ,
1818 req : Request ,
1919) : Promise < Response > {
20- const config = getConfig ( ctx . userConfig ) ;
20+ const config = getConfig ( ctx . config ) ;
2121
2222 const dbFiles = await ctx . db . files . findMany ( {
2323 where : {
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export async function run(
2020 ctx : ScriptContext ,
2121 req : Request ,
2222) : Promise < Response > {
23- const config = getConfig ( ctx . userConfig ) ;
23+ const config = getConfig ( ctx . config ) ;
2424
2525 // Ensure there are files in the upload
2626 if ( req . files . length === 0 ) {
You can’t perform that action at this time.
0 commit comments