fix: hard type controllers where the type is required to match

Prevent HTTP 500 errors where a 400 would be the correct response

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-01-12 12:21:31 +01:00 committed by nextcloud-command
parent 4c8b9deca0
commit 38ed0a8283
4 changed files with 18 additions and 18 deletions

View file

@ -73,9 +73,9 @@ class GlobalStoragesController extends StoragesController {
*/
#[PasswordConfirmationRequired(strict: true)]
public function create(
$mountPoint,
$backend,
$authMechanism,
string $mountPoint,
string $backend,
string $authMechanism,
$backendOptions,
$mountOptions,
$applicableUsers,
@ -138,10 +138,10 @@ class GlobalStoragesController extends StoragesController {
*/
#[PasswordConfirmationRequired(strict: true)]
public function update(
$id,
$mountPoint,
$backend,
$authMechanism,
int $id,
string $mountPoint,
string $backend,
string $authMechanism,
$backendOptions,
$mountOptions,
$applicableUsers,

View file

@ -67,9 +67,9 @@ abstract class StoragesController extends Controller {
* @return StorageConfig|DataResponse
*/
protected function createStorage(
$mountPoint,
$backend,
$authMechanism,
string $mountPoint,
string $backend,
string $authMechanism,
$backendOptions,
$mountOptions = null,
$applicableUsers = null,

View file

@ -138,7 +138,7 @@ class UserGlobalStoragesController extends StoragesController {
#[NoAdminRequired]
#[PasswordConfirmationRequired(strict: true)]
public function update(
$id,
int $id,
$backendOptions,
) {
try {

View file

@ -103,9 +103,9 @@ class UserStoragesController extends StoragesController {
#[NoAdminRequired]
#[PasswordConfirmationRequired(strict: true)]
public function create(
$mountPoint,
$backend,
$authMechanism,
string $mountPoint,
string $backend,
string $authMechanism,
$backendOptions,
$mountOptions,
) {
@ -158,10 +158,10 @@ class UserStoragesController extends StoragesController {
#[NoAdminRequired]
#[PasswordConfirmationRequired(strict: true)]
public function update(
$id,
$mountPoint,
$backend,
$authMechanism,
int $id,
string $mountPoint,
string $backend,
string $authMechanism,
$backendOptions,
$mountOptions,
) {