Internal fixes and cleanup

This commit is contained in:
Pablo Ferreiro 2022-11-04 20:08:19 +01:00
parent 1176bc35fe
commit 94da0e46ac
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
30 changed files with 128 additions and 113 deletions

View file

@ -7,13 +7,11 @@ use TikScraper\Models\Meta;
class ErrorHandler {
static public function showMeta(Meta $meta) {
http_response_code($meta->http_code);
$latte = Wrappers::latte();
$latte->render(Misc::getView('error'), new ErrorTemplate($meta->http_code, $meta->tiktok_msg, $meta->tiktok_code));
Wrappers::latte('error', new ErrorTemplate($meta->http_code, $meta->tiktok_msg, $meta->tiktok_code));
}
static public function showText(int $code, string $msg) {
http_response_code($code);
$latte = Wrappers::latte();
$latte->render(Misc::getView('error'), new ErrorTemplate($code, $msg));
Wrappers::latte('error', new ErrorTemplate($code, $msg));
}
}