Add pagination and add Hendle permision CORS
This commit is contained in:
1 parent
148603f4f3
commit
931153b0da
2 files changed
+10
-2
No files matched your search
@@ -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))
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user