Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#3 - Created OpenAPI Documentation #15

Merged
merged 44 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
98b0e37
added db field to check if user changed the password initially
zmigrOO Oct 18, 2024
72ddcae
implement initial app setup with user registration and middleware checks
zmigrOO Oct 19, 2024
7fc2e78
Fix vite and nginx settings and overall config for hot reload, enhanc…
zmigrOO Oct 20, 2024
9047360
Refactor user registration
zmigrOO Oct 20, 2024
5080907
Rename username field to name
zmigrOO Oct 20, 2024
0c2f957
Add PasswordField component with password tip visibility toggle and a…
zmigrOO Oct 20, 2024
4bce7b2
Add localization middleware and language support for admin setup
zmigrOO Oct 20, 2024
1021b2d
Localization finished
zmigrOO Oct 21, 2024
8c9696d
disabled admin seeder
zmigrOO Oct 21, 2024
af05a41
Create API endpoints
zmigrOO Oct 22, 2024
32f793f
fixes
zmigrOO Oct 22, 2024
1ab3883
fixes of fixes
zmigrOO Oct 24, 2024
92e13e7
Fix validation logic in store method of InitAppController
zmigrOO Oct 24, 2024
25082a7
migrations
zmigrOO Oct 24, 2024
ad98415
Refactor controllers and models to implement resourceful methods and …
zmigrOO Oct 28, 2024
cc3eeb7
before rebase
zmigrOO Nov 10, 2024
6d11428
Create API endpoints
zmigrOO Oct 22, 2024
f5a359b
migrations
zmigrOO Oct 24, 2024
42d9ef7
Refactor controllers and models to implement resourceful methods and …
zmigrOO Oct 28, 2024
67f9e30
before rebase
zmigrOO Nov 10, 2024
76d70c1
Merge branch '#2-Create-API-endpoints' of https://github.com/Aleksand…
zmigrOO Nov 10, 2024
8ca83ee
Implement user authentication and registration features, paginate keb…
zmigrOO Dec 1, 2024
ce097ed
vite fixed (again)
zmigrOO Dec 2, 2024
121c7de
Add relationships for KebabPlace model, implement API guard middlewar…
zmigrOO Dec 3, 2024
c61584f
Comments done
zmigrOO Dec 3, 2024
f8f1fda
Refactor suggestion storage logic and update API route for user sugge…
zmigrOO Dec 3, 2024
6d8a201
Merge branch 'main' into #2-Create-API-endpoints
zmigrOO Dec 9, 2024
b96a85d
for wsl users ❤️
zmigrOO Dec 15, 2024
83d5245
readme updated
zmigrOO Dec 15, 2024
b27c1bf
fix app init bug
zmigrOO Dec 15, 2024
3db7cc2
seeders done
zmigrOO Dec 15, 2024
de7c217
validation messsages
zmigrOO Dec 17, 2024
f097f28
fixes
zmigrOO Dec 17, 2024
2a8bf94
Update app/Http/Requests/UserRequest.php
zmigrOO Dec 18, 2024
e1a0557
return types
zmigrOO Dec 18, 2024
ec85db7
Merge branch '#2-Create-API-endpoints' of https://github.com/Aleksand…
zmigrOO Dec 18, 2024
a8e2a6a
seeder fix
Lee0z Dec 21, 2024
f7916a6
added missing return types
zmigrOO Dec 23, 2024
288fa7e
return type
zmigrOO Dec 27, 2024
1c53e01
error fix
zmigrOO Dec 28, 2024
bee0566
openapi documentation added
zmigrOO Jan 8, 2025
29600fd
Merge branch 'main' into #3-OpenAPI-Documentation
zmigrOO Jan 8, 2025
924cadd
fixed some errors
zmigrOO Jan 8, 2025
be8ac81
Merge branch '#3-OpenAPI-Documentation' of https://github.com/Aleksan…
zmigrOO Jan 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/Http/Controllers/FavoritesController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public function index(User $user): JsonResponse

public function store(Request $request): JsonResponse
{
$this->authorize('create', Favorites::class);

$userId = auth()->id();
$kebabPlaceId = $request->kebabPlace;
Expand Down
6 changes: 4 additions & 2 deletions app/Http/Controllers/FillingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class FillingController extends Controller
{
public function index(): JsonResponse
{
return response()->json_encode(Filling::all());
return response()->json(Filling::all());

}

public function store(Request $request): JsonResponse
Expand All @@ -30,7 +31,8 @@ public function store(Request $request): JsonResponse

public function show(Filling $filling): JsonResponse
{
return response()->json_encode($filling);
return response()->json($filling);

}

public function update(Request $request, Filling $filling): JsonResponse
Expand Down
6 changes: 4 additions & 2 deletions app/Http/Controllers/KebabPlaceController.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ public function show(Request $request, ?User $user): JsonResponse
$kebabPlace->comments->each(function ($comment) {
$comment->is_owner = $comment->user_id === auth()->id();
});
$kebabPlace->fillings = Filling::where('id', $kebabPlace->fillings)->get();
$kebabPlace->sauces = Sauce::where('id', $kebabPlace->sauces)->get();
$ids = explode(', ', $kebabPlace->fillings);
$kebabPlace->fillings = Filling::whereIn('id', $ids)->get();
$ids = explode(', ', $kebabPlace->sauces);
$kebabPlace->sauces = Sauce::whereIn('id', $ids)->get();

return response()->json($kebabPlace, 200);
}
Expand Down
4 changes: 3 additions & 1 deletion app/Http/Middleware/CheckIfInitialized.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@

use App\Models\User;
use Closure;
use Illuminate\Http\RedirectResponse;
use \Illuminate\Http\Request;
use Illuminate\Http\Response;

class CheckIfInitialized
{
public function handle(Request $request, Closure $next): Response
public function handle(Request $request, Closure $next): Response | RedirectResponse

{
if (User::where('role', 'admin')->doesntExist()) {
if ($request->path() !== 'init-app') {
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"require": {
"php": "^8.1",
"ext-intl": "*",
"blumilksoftware/openapi-toolbox": "^1.3",
"filament/filament": "^3.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/framework": "^10.10",
Expand Down
Loading