Exit with an error if profile info isn't available in Module\NoScrape

2022.09-rc
Hypolite Petovan 2020-06-05 14:28:11 -04:00
rodzic 2e0151bec0
commit 1304e14572
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -49,11 +49,14 @@ class NoScrape extends BaseModule
$which = $a->user['nickname'];
} else {
System::jsonError(403, 'Authentication required');
exit();
}
Profile::load($a, $which);
if (empty($a->profile['uid'])) {
System::jsonError(404, 'Profile not found');
}
$json_info = [
'addr' => $a->profile['addr'],
'nick' => $which,