Add pagination and add Hendle permision CORS

This commit is contained in:
Shuhrat Tulyaganov committed 2023-03-30 19:04:46 +03:00
1 parent 148603f4f3
commit 931153b0da
2 files changed
+10 -2

No files matched your search

+4
View File
@@ -103,6 +103,8 @@ func (r *RestServer) HendleFindID() http.HandlerFunc {
if err != nil {
r.logger.Errorln(err)
}
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
io.WriteString(w, string(jsonData))
}
}
@@ -118,6 +120,8 @@ func (r *RestServer) HendlePagination() http.HandlerFunc {
if err != nil {
r.logger.Errorln(err)
}
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Headers", "Content-Type")
io.WriteString(w, string(jsondata))
}