mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2025-01-03 14:32:40 +00:00
Adjust users of subscriptionIcon
This commit is contained in:
parent
cc2672fb0a
commit
76f1cc8e91
2 changed files with 3 additions and 3 deletions
|
@ -814,12 +814,12 @@ class V1 extends \JKingWeb\Arsse\REST\AbstractHandler {
|
||||||
} catch (ExceptionInput $e) {
|
} catch (ExceptionInput $e) {
|
||||||
return new ErrorResponse("404", 404);
|
return new ErrorResponse("404", 404);
|
||||||
}
|
}
|
||||||
if (!$icon['data']) {
|
if (!$icon || !$icon['data']) {
|
||||||
return new ErrorResponse("404", 404);
|
return new ErrorResponse("404", 404);
|
||||||
}
|
}
|
||||||
return new Response([
|
return new Response([
|
||||||
'id' => $icon['id'],
|
'id' => $icon['id'],
|
||||||
'data' => ($icon['type'] ?? "application/octet-stream").";base64,".base64_encode($icon['data']),
|
'data' => ($icon['type'] ?: "application/octet-stream").";base64,".base64_encode($icon['data']),
|
||||||
'mime_type' => $icon['type'],
|
'mime_type' => $icon['type'],
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,7 @@ class Icon extends \JKingWeb\Arsse\REST\AbstractHandler {
|
||||||
return new Response(404);
|
return new Response(404);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$url = Arsse::$db->subscriptionIcon(Arsse::$user->id ?? null, (int) $match[1], false)['url'];
|
$url = Arsse::$db->subscriptionIcon(Arsse::$user->id ?? null, (int) $match[1], false)['url'] ?? null;
|
||||||
if (!$url) {
|
if (!$url) {
|
||||||
return new Response(404);
|
return new Response(404);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue