Relative Content

Tag Archive for javascriptexpressapihttp

POST request successful, GET request giving 200 code but empty array

I am a beginner and practising writing some API routes to a MySQL database. My database is being updated successfully using both the form on my application and in Postman. When I use the MySQL interface, ‘select * from moods;’ works and returns the tables, but my GET request is just returning an empty array (in POSTMAN and frontend) and giving the 200 OK code.