mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2024-11-24 01:26:22 +03:00
delete version javascript file
This commit is contained in:
parent
857b19b36a
commit
c1d27ef76c
2 changed files with 0 additions and 33 deletions
|
@ -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)))
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
$.ajax({
|
||||
url: "http://localhost:8080/api/get/version",
|
||||
type: "GET",
|
||||
success: function(data){
|
||||
$("#program-version").text(data.message);
|
||||
}
|
||||
})
|
Loading…
Add table
Reference in a new issue