Migrate templates to EJS

This commit is contained in:
Fred Boniface 2024-05-01 01:17:11 +01:00
parent 9b083ea0b7
commit 83792b80cd
2 changed files with 14 additions and 14 deletions

14
src/views/upload_err.ejs Normal file
View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Error - <%= code %></title>
</head>
<body>
<h1>Error <%= code %></h1>
<% if (code === 400) { %>
<p>You did not choose a file to upload</p>
<% } else if (code === 415) { %>
<p>You must only upload PDF files</p>
<% } %>
</body>
</html>

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Error - {{ code }}</title>
</head>
<body>
<h1>Error {{ code }}</h1>
{% if code == 400 %}
<p>You did not choose a file to upload</p>
{% elif code == 415 %}
<p>You must only upload PDF files</p>
{% endif %}
</body>
</html>