package server

import (
	"madsky.ru/go-tracker/internal/server/response"
	"net/http"
)

func (app *Application) getVersion(w http.ResponseWriter, r *http.Request) {
	s, err := app.Storage.ServerSettings.Find(app.Ctx)
	if err != nil {
		response.Error(w, err, http.StatusBadRequest)
		return
	}

	response.WriteJSON(w, nil, http.StatusOK, &s)
}
