mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2025-12-27 09:23:52 -05:00
This is the first PR in API consistency with more to come: 1. The source API urls have been properly defined with `/source/:source/list` and `/source/:source/load/:language/:filename` - These used to be two API endpoints mushed together into one `handle()` function. They are now separate - While it may appear from the tests that this is an API breakage, there's currently no way to have the source API spit out responses for stuff like `/source/moose/load/Grunkle`. 2. The frontend code calling the list api now has shared types 3. Code has been migrated to `/lib/handlers/api/source.ts` - I've moved code here, because I would like to separate the stuff that's under the API and the stuff that isn't (e.g., healthcheck) - The source endpoint is currently not under /api, but I believe it makes sense to move it. 4. GitHub is terrible at showing the diff, but the `browser.ts` file has been removed, since it's never actually used. Our frontend only calls `/source/builtin/...` and it never had any entries. Besides, the type used on the frontend for the locally stored stuff is different...