neatnik / omg.lol

Cool stuff for omg.lol
MIT License
366 stars 49 forks source link

[Bug] PURL API endpoint purl/purls #538

Open wayneyaoo opened 1 year ago

wayneyaoo commented 1 year ago

Bug Description

PURL API has a small discrepancy in the endpoint face a bit different from other API.

List all statuses:

https://api.omg.lol/address/wy-test/statuses

Get a single status:

https://api.omg.lol/address/wy-test/statuses/63c387df0e0a7

But for PURL, it's like this:

Get all

https://api.omg.lol/address/wy-test/**purls**

Get one

https://api.omg.lol/address/wy-test/**purl**/dontdelete

it should be all "purls" right?

Steps to Reproduce

No response

wayneyaoo commented 1 year ago

POST a new PURL only works in "purl", not "purls". This should get fixed as well :)

wayneyaoo commented 1 year ago

I'll reuse this issue for another problem ... hope it's okay.

The "counter" field is "null" when retrieving a PURL that hasn't been hit. It should be 0 right? the type should be .. integer, not string, similar to this one #531.