Commit graph

23 commits

Author SHA1 Message Date
tadhgboyle
fcaa51708c
Use Symfony Response HTTP status code constants (#3472) 2023-12-16 09:23:59 -08:00
Tadhg Boyle
d0fba0cbe9
Replace Util::getSetting/Util::setSetting usages (#3387) 2023-06-12 10:30:49 -06:00
Robin
4be06eabe2 New API error for missing API key
This makes troubleshooting easier if a web server or proxy strips the Authorization header
2022-06-09 20:14:12 +02:00
Robin
0126159a6e Remove all manual settings usage 2022-05-31 23:23:26 +02:00
Partydragen
7e58929f34
Fix invalid post contents error on null 2022-05-31 21:33:11 +02:00
Tadhg Boyle
e3b51b7337 New namespaced API error codes (Closes #2779) 2022-05-24 23:05:15 -06:00
Tadhg Boyle
9b054f9cb9 Misc fixes with DTO 2022-04-17 20:09:15 -07:00
Tadhg Boyle
b585a84de7 Add never return typehints to API methods 2022-03-20 11:33:38 -07:00
Tadhg Boyle
7da6d7f559
Update Nameless2API.php 2022-03-06 11:20:53 -08:00
Robin
d3b90f76ba I don't know PHP 2022-03-05 23:27:05 +01:00
Robin
b6fe9a8b5c php 7.4 2022-03-05 23:25:03 +01:00
Robin
8bebd55558 Only pretty print json response if DEBUGGING 2022-03-05 23:20:09 +01:00
Tadhg Boyle
94e64c1207
Add PHPDocs to core classes for new class docs site (#2602) 2022-02-14 20:48:15 -08:00
Tadhg Boyle
ad17142a16
Misc cleanup (#2566) 2022-01-15 15:18:05 -08:00
Tadhg Boyle
c6a9f86f4d
API auth revamp (#2564) 2022-01-15 11:48:52 -08:00
Tadhg Boyle
4fa6f2f718
API route binding (#2561) 2022-01-15 11:45:26 -08:00
Robin
0cf40a2b5a this probably should not accept null values
I don't think it is ever passed null values
2022-01-12 10:42:55 +01:00
Robin
ac44b5d809 timing safe equals (untested) 2022-01-12 10:38:41 +01:00
Tadhg
e0133a5cd5 Get PHP-CS to pass! 2021-12-07 22:14:12 -08:00
Tadhg
cdb6c27bd9 Add optional $status param to throwError and returnArray API methods + implement some 2021-11-20 21:56:50 -08:00
Tadhg
6b59339eff Fix same route endpoint handling + allow using "/" in endpoint routes
Credit: Supercrafter
2021-11-18 08:48:36 -08:00
Tadhg
814f771bb8 Add appropriate error for invalid HTTP method on an endpoint 2021-11-17 19:36:26 -08:00
Tadhg
7baa315a2a Move Nameless2API class into it's own file 2021-11-17 08:40:02 -08:00