From c1d27ef76c66c2e52b3c621502cf7ffdc6ccbd68 Mon Sep 17 00:00:00 2001 From: Redume Date: Sun, 23 Oct 2022 15:30:12 +0300 Subject: [PATCH] delete version javascript file --- api/controllers/version.go | 26 -------------------------- web/static/scripts/version.js | 7 ------- 2 files changed, 33 deletions(-) delete mode 100644 api/controllers/version.go delete mode 100644 web/static/scripts/version.js diff --git a/api/controllers/version.go b/api/controllers/version.go deleted file mode 100644 index c7f5340..0000000 --- a/api/controllers/version.go +++ /dev/null @@ -1,26 +0,0 @@ -package controllers - -import ( - "net/http" - "os" - - "github.com/Redume/EveryNasa/api/utils" - "github.com/Redume/EveryNasa/functions" - "gopkg.in/yaml.v2" -) - -var Version = func(w http.ResponseWriter, r *http.Request) { - file, err := os.ReadFile("config.yaml") - if err != nil { - functions.Logger(err.Error()) - } - - data := make(map[interface{}]interface{}) - - err = yaml.Unmarshal(file, &data) - if err != nil { - functions.Logger(err.Error()) - } - - utils.Respond(w, utils.Message(true, data["version"].(string))) -} diff --git a/web/static/scripts/version.js b/web/static/scripts/version.js deleted file mode 100644 index 83d88b1..0000000 --- a/web/static/scripts/version.js +++ /dev/null @@ -1,7 +0,0 @@ -$.ajax({ - url: "http://localhost:8080/api/get/version", - type: "GET", - success: function(data){ - $("#program-version").text(data.message); - } -}) \ No newline at end of file