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

Make API more RESTful #98

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d4407e1
Create 2021_06_01_202948_medialibrary_v8_update_media_table.php
TomBurch Jun 1, 2021
3ff7d5d
Update discord, remove permissions/steam/username
TomBurch Jun 12, 2021
262db17
Permission comments
TomBurch Jun 12, 2021
646f76f
More permissions
TomBurch Jun 14, 2021
89bcc8a
name -> username
TomBurch Jun 16, 2021
d2dce51
Missed instances
TomBurch Jun 16, 2021
1951671
Update Mission.php
TomBurch Jun 17, 2021
e84cac2
Implement ValidateMissionContents
TomBurch Feb 21, 2021
14b65d7
Fix + translate PBOMission errors
TomBurch Feb 21, 2021
b075a8b
Remove PBOMission changes from master
TomBurch Feb 21, 2021
49c2923
Upgrade laravel/framework to v8 (latest)
TomBurch Jun 20, 2021
e2b0f05
Use HTTP facade
TomBurch Jun 20, 2021
43c5b2c
Add method for migration
TomBurch Jun 21, 2021
04fe335
Restore migration files
TomBurch Jun 21, 2021
4244490
Remove line
TomBurch Jun 21, 2021
8a32b93
Redirect on failed getRoles
TomBurch Jun 21, 2021
a140d31
Rework operations
TomBurch Jun 24, 2021
f8acfd4
Move operations into hub middleware, rename create to store
TomBurch Jun 24, 2021
f80d3d3
Rework settings
TomBurch Jun 25, 2021
d540fd2
Rework comments
TomBurch Jun 26, 2021
6af9792
Rework briefing
TomBurch Jun 30, 2021
adfa398
Clean up Users
TomBurch Jul 6, 2021
fc7ad32
Rework Notes
TomBurch Jul 7, 2021
660b7b0
Update web.php
TomBurch Jul 7, 2021
fbafca8
Make comments shallow
TomBurch Jul 8, 2021
0fbe823
Rework Orbat
TomBurch Jul 9, 2021
5c76f3e
Remove unused $mission params
TomBurch Aug 9, 2021
ff0cd60
Update OperationController.php
TomBurch Aug 9, 2021
87a84d1
Rebase fixes
TomBurch Jan 25, 2022
edda269
Rebase fixes
TomBurch Jan 25, 2022
b7d908f
Rebase fixes
TomBurch Jan 25, 2022
9a63a89
Fix download endpoint
TomBurch Jan 25, 2022
0278ffb
Update web.php
TomBurch Jan 25, 2022
e770823
Update web.php
TomBurch Jan 25, 2022
5f18a2d
Update Mission.php
TomBurch Jan 25, 2022
03a9094
Simplify PublicJoinController
TomBurch Jan 26, 2022
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
144 changes: 0 additions & 144 deletions app/Http/Controllers/API/OperationController.php

This file was deleted.

115 changes: 0 additions & 115 deletions app/Http/Controllers/API/OperationMissionController.php

This file was deleted.

18 changes: 0 additions & 18 deletions app/Http/Controllers/HubController.php

This file was deleted.

59 changes: 0 additions & 59 deletions app/Http/Controllers/MediaController.php

This file was deleted.

36 changes: 36 additions & 0 deletions app/Http/Controllers/Missions/BriefingController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace App\Http\Controllers\Missions;

use App\Http\Controllers\Controller;
use App\Models\Missions\Mission;

use Illuminate\Http\Request;

class BriefingController extends Controller
{
/**
* Shows the given mission's briefing.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request, Mission $mission, int $faction)
{
return view('missions.briefing', compact('mission', 'faction'));
}

/**
* Locks/unlocks the given briefing faction for the given mission.
*
* @return void
*/
public function setLock(Request $request, Mission $mission, int $faction)
{
if (!$mission->isMine() && !auth()->user()->can('manage-missions')) {
abort(403, 'You are not authorised to edit this mission');
return;
}

$mission->lockBriefing($faction, $request->locked);
}
}
Loading