ucd-library / fin

FIN (Fedora IN docker) Base Services
MIT License
0 stars 0 forks source link

Need support for HEAD requests #72

Open UcDust opened 9 months ago

UcDust commented 9 months ago

This is related.

In Aggie Experts, we need the ability to make HEAD requests and get a response that shows whether the document exists in ES.

In the current use case, we'd like to make a HEAD request to see if an expert exists in the app, and if not, we'd like to hide a link to the experts' profile.

Currently, the GET route in default-api.js is returning a 200 status code as an error, but with the HEAD request there is no body describing the error.

Something like this could work- Screenshot 2023-11-27 at 09 53 11

Although I'm not sure which status code we'd want to return. Or we could create a HEAD route instead of letting Express default to the GET route.