File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ async function login() {
1818 $ ( "#login-spinner" ) . show ( ) ;
1919 $ ( "#login-btn-login, #login-btn-new, #login-input" ) . prop ( "disabled" , true ) ;
2020 try {
21- const f = await fetch ( `https://pocketdatabase.vercel.app/v1/api/api/v1/ read?record=main&token=${ token } ` ) ;
21+ const f = await fetch ( `https://pocketdatabase.vercel.app/v1/api/read?record=main&token=${ token } ` ) ;
2222 const res = await f . json ( ) ;
2323 if ( ! res . success && res . error . includes ( "ACCESS_TOKEN_INVALID" ) ) {
2424 $ ( "#login-input" ) . addClass ( "pdb-input-error" ) ;
@@ -199,7 +199,7 @@ async function commit(key) {
199199 headers : {
200200 "Content-Type" : "application/json"
201201 } ,
202- body : null
202+ body : " null"
203203 } ) ;
204204 const res = await f . json ( ) ;
205205 if ( ! res . success && res . error == "INTERNAL_ERROR" ) {
@@ -235,7 +235,7 @@ async function commit(key) {
235235 }
236236 $ ( `[data-textarea="${ key } "]` ) . removeClass ( "pdb-input-error" ) ;
237237 $ ( `[data-label="${ key } "]` ) . hide ( ) ;
238- let value = $ ( `[data-textarea="${ key } "]` ) . val ( ) . trim ( ) || "null" ;
238+ let value = $ ( `[data-textarea="${ key } "]` ) . val ( ) . trim ( ) ;
239239 try {
240240 value = JSON . parse ( value ) ;
241241 if ( typeof value == "number" && ! isFinite ( value ) ) value = value < 0 ? Number . MIN_VALUE : Number . MAX_VALUE ;
You can’t perform that action at this time.
0 commit comments