mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
Plugins base (#613)
* wip * wip * cleanup * notification channels * phpstan * services * remove server types * refactoring * refactoring
This commit is contained in:
@ -42,7 +42,7 @@ public function index(Project $project): ResourceCollection
|
||||
|
||||
#[Post('/', name: 'api.projects.source-controls.create', middleware: 'ability:write')]
|
||||
#[Endpoint(title: 'create')]
|
||||
#[BodyParam(name: 'provider', description: 'The provider', required: true, enum: [\App\Enums\SourceControl::GITLAB, \App\Enums\SourceControl::GITHUB, \App\Enums\SourceControl::BITBUCKET])]
|
||||
#[BodyParam(name: 'provider', description: 'The provider', required: true)]
|
||||
#[BodyParam(name: 'name', description: 'The name of the storage provider.', required: true)]
|
||||
#[BodyParam(name: 'token', description: 'The token if provider requires api token')]
|
||||
#[BodyParam(name: 'url', description: 'The URL if the provider is Gitlab and it is self-hosted')]
|
||||
@ -61,7 +61,7 @@ public function create(Request $request, Project $project): SourceControlResourc
|
||||
#[Get('{sourceControl}', name: 'api.projects.source-controls.show', middleware: 'ability:read')]
|
||||
#[Endpoint(title: 'show')]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
|
||||
public function show(Project $project, SourceControl $sourceControl): \App\Http\Resources\SourceControlResource
|
||||
public function show(Project $project, SourceControl $sourceControl): SourceControlResource
|
||||
{
|
||||
$this->authorize('view', $sourceControl);
|
||||
|
||||
@ -79,7 +79,7 @@ public function show(Project $project, SourceControl $sourceControl): \App\Http\
|
||||
#[BodyParam(name: 'password', description: 'The password if the provider is Bitbucket')]
|
||||
#[BodyParam(name: 'global', description: 'Accessible in all projects', enum: [true, false])]
|
||||
#[ResponseFromApiResource(SourceControlResource::class, SourceControl::class)]
|
||||
public function update(Request $request, Project $project, SourceControl $sourceControl): \App\Http\Resources\SourceControlResource
|
||||
public function update(Request $request, Project $project, SourceControl $sourceControl): SourceControlResource
|
||||
{
|
||||
$this->authorize('update', $sourceControl);
|
||||
|
||||
|
Reference in New Issue
Block a user