mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-25 13:10:35 +00:00
Some last minute updates.
This commit is contained in:
@@ -64,13 +64,13 @@ class RuleController extends Controller
|
||||
/**
|
||||
* Delete the resource.
|
||||
*
|
||||
* @param string $object
|
||||
* @param Rule $rule
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function delete(string $object): JsonResponse
|
||||
public function delete(Rule $rule): JsonResponse
|
||||
{
|
||||
// todo delete object.
|
||||
$this->ruleRepository->destroy($rule);
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
@@ -66,9 +66,9 @@ class RuleGroupController extends Controller
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function delete(string $object): JsonResponse
|
||||
public function delete(RuleGroup $ruleGroup): JsonResponse
|
||||
{
|
||||
// todo delete object.
|
||||
$this->ruleGroupRepository->destroy($ruleGroup, null);
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
@@ -1,112 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* TagController.php
|
||||
* Copyright (c) 2018 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace FireflyIII\Api\V1\Controllers;
|
||||
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
|
||||
class TagController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->middleware(
|
||||
function ($request, $next) {
|
||||
/** @var User $user */
|
||||
$user = auth()->user();
|
||||
|
||||
// todo add local repositories.
|
||||
return $next($request);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete the resource.
|
||||
*
|
||||
* @param string $object
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function delete(string $object): JsonResponse
|
||||
{
|
||||
// todo delete object.
|
||||
|
||||
return response()->json([], 204);
|
||||
}
|
||||
|
||||
/**
|
||||
* List all of them.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse]
|
||||
*/
|
||||
public function index(Request $request): JsonResponse
|
||||
{
|
||||
// todo implement.
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* List single resource.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param string $object
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function show(Request $request, string $object): JsonResponse
|
||||
{
|
||||
// todo implement me.
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Store new object.
|
||||
*
|
||||
* @param Request $request
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function store(Request $request): JsonResponse
|
||||
{
|
||||
// todo replace code and replace request object.
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Request $request
|
||||
* @param string $object
|
||||
*
|
||||
* @return JsonResponse
|
||||
*/
|
||||
public function update(Request $request, string $object): JsonResponse
|
||||
{
|
||||
// todo replace code and replace request object.
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user