-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added mergado hooks route to routes.php
Changed oauthController changed getrosourceOwnerId to getUserId on Accesstoken Signed-off-by: hudecsamuel <[email protected]>
- Loading branch information
1 parent
f67f767
commit 14b9737
Showing
6 changed files
with
50 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace App\Http\Controllers; | ||
|
||
use App\Hooks\CreateHook; | ||
use App\Hooks\DeleteHook; | ||
use Illuminate\Http\Request; | ||
|
||
use App\Http\Requests; | ||
|
||
class HookController extends Controller | ||
{ | ||
public function index(Request $request) | ||
{ | ||
$data = $request->all(); | ||
|
||
if(!isset($data["action"])) { | ||
return response()->json(["message" => "Action undefined!"], 400); | ||
} | ||
|
||
switch ($data["action"]) { | ||
case "app.enable": | ||
$hook = new CreateHook($data["entity_id"]); | ||
break; | ||
case "app.disable": | ||
$hook = new DeleteHook($data["entity_id"]); | ||
break; | ||
default: | ||
return response()->json(["message" => "Unsupported action!"], 400); | ||
} | ||
|
||
return $hook->run(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters