File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ const promiseToSetOrDelStorage = (
118118 : storage . put < string | number | boolean > ( key , value ) ,
119119 ) ;
120120
121- const getResponse = ( status : number , body : string | null = null ) =>
121+ const newResponse = ( status : number , body : string | null = null ) =>
122122 new Response ( body , { status, headers : CORS_HEADERS } ) ;
123123
124124export class TinyBasePartyKitServer implements TinyBasePartyKitServerDecl {
@@ -131,19 +131,19 @@ export class TinyBasePartyKitServer implements TinyBasePartyKitServerDecl {
131131 const text = await request . text ( ) ;
132132 if ( request . method == PUT ) {
133133 if ( hasStore ) {
134- return getResponse ( 205 ) ;
134+ return newResponse ( 205 ) ;
135135 }
136136 await saveStoreToStorage ( this . party . storage , jsonParse ( text ) ) ;
137- return getResponse ( 201 ) ;
137+ return newResponse ( 201 ) ;
138138 }
139- return getResponse (
139+ return newResponse (
140140 200 ,
141141 hasStore
142142 ? jsonString ( await loadStoreFromStorage ( storage ) )
143143 : EMPTY_STRING ,
144144 ) ;
145145 }
146- return getResponse ( 404 ) ;
146+ return newResponse ( 404 ) ;
147147 }
148148
149149 async onMessage ( message : string , client : Connection ) {
You can’t perform that action at this time.
0 commit comments