small fixes

This commit is contained in:
Pablo Ferreiro 2022-01-03 17:06:25 +01:00
parent 340f500206
commit fe3ae82100
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
4 changed files with 5 additions and 6 deletions

View file

@ -20,7 +20,7 @@ function getApi(array $proxy_elements): \Sovit\TikTok\Api {
function getLatte(): \Latte\Engine {
$subdir = getSubdir();
$latte = new Latte\Engine;
$latte->setTempDirectory('./cache/views');
$latte->setTempDirectory(__DIR__ . '/../cache/views');
$latte->addFunction('assets', function (string $name, string $type) use ($subdir) {
$path = "{$subdir}/{$type}/{$name}";
return $path;
@ -33,7 +33,7 @@ function getLatte(): \Latte\Engine {
}
function getView(string $template): string {
return "./views/{$template}.latte";
return __DIR__ . "/../views/{$template}.latte";
}
Route::add('/', function () {