File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -23,3 +23,5 @@ allcode.txt
2323* .njsproj
2424* .sln
2525* .sw ?
26+
27+ .env. *
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import type { Statement } from '../../types/types';
66export async function postNewStatement ( statement : Statement ) : Promise < void > {
77 try {
88 // POST operation
9- const postResponse = await fetch ( `${ API_URL } newEntry` , {
9+ const postResponse = await fetch ( `${ API_URL } / newEntry` , {
1010 method : 'POST' ,
1111 headers : {
1212 'Content-Type' : 'application/json' ,
@@ -20,7 +20,7 @@ export async function postNewStatement(statement: Statement): Promise<void> {
2020 console . log ( 'Successfully posted:' , postData ) ;
2121
2222 // Optionally, if you want to fetch updated data after posting:
23- const getResponse = await fetch ( `${ API_URL } n/s/${ statement . subject } ` ) ;
23+ const getResponse = await fetch ( `${ API_URL } / n/s/${ statement . subject } ` ) ;
2424 if ( ! getResponse . ok ) {
2525 throw new Error ( `HTTP error on GET! status: ${ getResponse . status } ` ) ;
2626 }
You can’t perform that action at this time.
0 commit comments