delete version javascript file

This commit is contained in:
Данил 2022-10-23 15:30:12 +03:00
parent 857b19b36a
commit c1d27ef76c
2 changed files with 0 additions and 33 deletions

View file

@ -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)))
}

View file

@ -1,7 +0,0 @@
$.ajax({
url: "http://localhost:8080/api/get/version",
type: "GET",
success: function(data){
$("#program-version").text(data.message);
}
})