Demo image route

This commit is contained in:
2024-07-27 19:03:18 +02:00
parent 7144b017b3
commit 24fad3bb59
3 changed files with 14 additions and 7 deletions
+7
View File
@@ -3,6 +3,7 @@
// Namespaces
use Khofmann\ApiError\ApiError;
use Khofmann\Input\Input;
use Pecee\SimpleRouter\SimpleRouter;
use Pecee\Http\Request;
use Khofmann\Response\Response;
@@ -55,6 +56,12 @@ SimpleRouter::group(["middleware" => Khofmann\Auth\Auth::class], function () {
SimpleRouter::get("/users/{id}", [Api\Users\Users::class, "get"]);
// Update self
SimpleRouter::patch("/users/self", [Api\Users\Users::class, "patchSelf"]);
// Update image self
SimpleRouter::patch("/users/self/image", function () {
print_r(Input::file("image"));
echo "\n";
print_r(Input::patch("predefined"));
}); //[Api\Users\Users::class, "patchImageSelf"]);
// Update post
SimpleRouter::patch("/posts/{id}", [Api\Posts\Posts::class, "patch"]);
// Create post