image: improve typing

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/767/head
Varun Patil 2023-08-03 18:57:23 -07:00
parent db5030c18b
commit d00411670e
1 changed files with 3 additions and 3 deletions

View File

@ -177,13 +177,13 @@ class ImageController extends GenericApiController
* @param string fileid * @param string fileid
*/ */
public function info( public function info(
string $id, int $id,
bool $basic = false, bool $basic = false,
bool $current = false, bool $current = false,
bool $tags = false bool $tags = false
): Http\Response { ): Http\Response {
return Util::guardEx(function () use ($id, $basic, $current, $tags) { return Util::guardEx(function () use ($id, $basic, $current, $tags) {
$file = $this->fs->getUserFile((int) $id); $file = $this->fs->getUserFile($id);
// Get the image info // Get the image info
$info = $this->timelineQuery->getInfoById($file->getId(), $basic); $info = $this->timelineQuery->getInfoById($file->getId(), $basic);
@ -355,7 +355,7 @@ class ImageController extends GenericApiController
// Make sure the preview is updated // Make sure the preview is updated
\OC::$server->get(\OCP\IPreview::class)->getPreview($file); \OC::$server->get(\OCP\IPreview::class)->getPreview($file);
return $this->info((string) $file->getId(), true); return $this->info($file->getId(), true);
}); });
} }