File tree Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Expand file tree Collapse file tree 2 files changed +5
-21
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,7 @@ interface Env {
1717 DATABASE_DURABLE_OBJECT : DurableObjectNamespace ;
1818 STUDIO_USER ?: string ;
1919 STUDIO_PASS ?: string ;
20- // ## DO NOT REMOVE: INSERT TEMPLATE INTERFACE ##
21- AUTH : {
22- handleAuth ( pathname : string , verb : string , body : any ) : Promise < Response > ;
23- }
20+ // ## DO NOT REMOVE: TEMPLATE INTERFACE ##
2421}
2522
2623export class DatabaseDurableObject extends DurableObject {
@@ -293,16 +290,7 @@ export default {
293290 let id : DurableObjectId = env . DATABASE_DURABLE_OBJECT . idFromName ( DURABLE_OBJECT_ID ) ;
294291 let stub = env . DATABASE_DURABLE_OBJECT . get ( id ) ;
295292
296- // ## DO NOT REMOVE: INSERT TEMPLATE ROUTING LOGIC ##
297-
298- /**
299- * If the pathname starts with /auth, we want to pass the request off to another Worker
300- * that is responsible for handling authentication.
301- */
302- if ( pathname . startsWith ( '/auth' ) ) {
303- const body = await request . json ( ) ;
304- return await env . AUTH . handleAuth ( pathname , request . method , body ) ;
305- }
293+ // ## DO NOT REMOVE: TEMPLATE ROUTING ##
306294
307295 /**
308296 * Pass the fetch request directly to the Durable Object, which will handle the request
Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ compatibility_date = "2024-09-25"
55account_id = " "
66
77# Service Bindings
8- # # DO NOT REMOVE: INSERT TEMPLATE SERVICE BINDINGS ##
9- [[services ]]
10- binding = " AUTH"
11- service = " starbasedb_auth"
12- entrypoint = " AuthEntrypoint"
8+ # # DO NOT REMOVE: TEMPLATE SERVICES ##
139
1410# Workers Logs
1511# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
@@ -35,5 +31,5 @@ AUTHORIZATION_TOKEN = "ABC123"
3531
3632# Uncomment the section below to create a user for logging into your database UI.
3733# You can access the Studio UI at: https://your_endpoint/studio
38- STUDIO_USER = " admin"
39- STUDIO_PASS = " 123456"
34+ # STUDIO_USER = "admin"
35+ # STUDIO_PASS = "123456"
You can’t perform that action at this time.
0 commit comments