Commit graph

27 commits

Author SHA1 Message Date
Hypolite Petovan 1b9ec3a214 Rename BaseApi->logErrorAndJsonExit to logAndJsonError to better match the functionality
- Also it's shorter and we're paying by the character
2023-10-11 09:44:03 -04:00
Hypolite Petovan 7486ebdc10 Move jsonError out of Factory\Api\Mastodon\Error->UnprocessableEntity 2023-10-11 09:44:03 -04:00
Hypolite Petovan 7f846f153d Move jsonError out of Factory\Api\Mastodon\Error->RecordNotFound 2023-10-11 09:44:02 -04:00
Hypolite Petovan 9e71610711 Make BaseApi->checkAllowedScope into an object method
- It isn't called from static contexts anymore
2023-10-11 09:43:57 -04:00
Hypolite Petovan 81279dad9e Move System::jsonExit to BaseModule->jsonExit
- This will ensure headers set in BaseModule->run will be carried in jsonExit scenarios
- Deprecate jsonExit() method in Core\System
2023-09-24 07:08:15 -04:00
Hypolite Petovan 1874a32728 Happy New Year 2023! 2023-01-01 09:36:24 -05:00
Philipp 322b7c856c
Merge pull request #11129 from urbalazs/copyright-2022
Update copyright
2022-01-02 09:45:35 +01:00
Balázs Úr e56a53647b Update copyright 2022-01-02 08:27:47 +01:00
Michael d57cb05a24 Fix: array_reverse returns the reversed content as return value 2021-12-05 06:22:04 +00:00
Philipp Holzer 2e4d654c0a Make $_REQUEST processing independent of sub-calls
- Move HTTPInputData::process() into App::runFrontend()
- Pass $_REQUEST (including processed Input) to every Module method
- Delete $_POST parameters at Module post() calls because of $_REQUEST
2021-11-30 01:07:58 -05:00
Philipp Holzer f580d8e5c0 extract "BaseApi::checkDefaults()" method for later usage 2021-11-30 01:07:57 -05:00
Hypolite Petovan 9cc675233d Add a second parameter to BaseApi::getRequest to enable API tests 2021-11-27 18:38:09 -05:00
Philipp Holzer 537b74f307
Inherit ApiResponse from Response 2021-11-27 12:40:54 +01:00
Philipp Holzer 8bdd90066f
Make BaseModule a real entity
- Add all dependencies, necessary to run the content (baseUrl, Arguments)
- Encapsulate all POST/GET/DELETE/PATCH/PUT methods as protected methods inside the BaseModule
- Return Module content ONLY per `BaseModule::run()` (including the Hook logic there as well)
2021-11-27 12:40:36 +01:00
Philipp Holzer 5879535822
Switch static::$parameters to $this->parameters 2021-11-14 23:49:07 +01:00
Philipp Holzer 489cd0884a
Make BaseModule methods dynamic 2021-11-14 23:49:06 +01:00
Philipp Holzer 714f0febc4
Replace $parameters argument per method with static::$parameters 2021-11-14 23:49:05 +01:00
Philipp Holzer 5bfcc8b91c
Transform ApiResponse::unspported() into dynamic method 2021-11-12 20:07:05 +01:00
Philipp Holzer 319f91301d
Move API Response methods into an own class to make them mockable 2021-11-12 19:52:01 +01:00
Michael 6c8a4a2552 Use a centralized function to delete delayed entries 2021-08-02 20:56:34 +00:00
Michael 88e276843e Using "post" when deleting, fixing deleting 2021-08-02 19:18:44 +00:00
Michael 929de9081e All needed fields are now filled 2021-07-30 13:22:06 +00:00
Michael 93263a820d Function renamed, documentation added 2021-07-30 10:24:08 +00:00
Michael bb37c41bd7 Scheduled posts can now be created 2021-07-30 06:22:32 +00:00
Michael a1828430e5 Fixing variables 2021-07-29 14:58:04 +00:00
Michael 6ea3d4aa61 Added API calls, removed fields 2021-07-29 10:34:31 +00:00
Michael 3aa883f1e3 API: List handling, dummy endpoints 2021-05-13 21:15:32 +00:00