style ci fix

This commit is contained in:
SrS2225a 2023-01-17 21:39:40 -08:00
parent acaceea3f1
commit 69d6ae298e

View file

@ -208,7 +208,7 @@ class MediaController extends Controller
$vanity = preg_replace('/[^a-z0-9]+/', '-', strtolower($vanity)); $vanity = preg_replace('/[^a-z0-9]+/', '-', strtolower($vanity));
//handle collisions //handle collisions
$collision = $this->database->query('SELECT * FROM `uploads` WHERE `code` = ? AND `id` != ? LIMIT 1',[$vanity, $id])->fetch(); $collision = $this->database->query('SELECT * FROM `uploads` WHERE `code` = ? AND `id` != ? LIMIT 1', [$vanity, $id])->fetch();
if (!$media) { if (!$media) {
throw new HttpNotFoundException($request); throw new HttpNotFoundException($request);
@ -218,7 +218,7 @@ class MediaController extends Controller
throw new HttpBadRequestException($request); throw new HttpBadRequestException($request);
} }
$this->database->query('UPDATE `uploads` SET `code` = ? WHERE `id` = ?',[$vanity, $media->id]); $this->database->query('UPDATE `uploads` SET `code` = ? WHERE `id` = ?', [$vanity, $media->id]);
$media->code = $vanity; $media->code = $vanity;
$response->getBody()->write(json_encode($media)); $response->getBody()->write(json_encode($media));