From e0511a1b4711edca727bc09d051c3a99db2364a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Steffen=20S=C3=A6ther?= <steffels@stud.ntnu.no>
Date: Wed, 6 Mar 2024 19:44:13 +0000
Subject: [PATCH] Upload New File

---
 oblig1/endpoints/error.go | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 oblig1/endpoints/error.go

diff --git a/oblig1/endpoints/error.go b/oblig1/endpoints/error.go
new file mode 100644
index 0000000..3c1f14c
--- /dev/null
+++ b/oblig1/endpoints/error.go
@@ -0,0 +1,8 @@
+package endpoints
+
+import "net/http"
+
+func Errorhandler(w http.ResponseWriter, r *http.Request) {
+	errormes := "Oblig 1\nEndpoints:\n/librarystats/v1/bookcount/?language='iso_code'\n/librarystats/v1/readership/'iso-code'/?limit=<int>\n/librarystats/v1/status/"
+	http.Error(w, errormes, http.StatusNotFound)
+}
-- 
GitLab