add db models, refactor json models, add references in migrations
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models"
|
||||
json_model "gitea.local.lab/Lbenedar/foundry_helper_service/internal/foundry/models/json"
|
||||
)
|
||||
|
||||
func (conf *Config) GetSessionId() error {
|
||||
@@ -42,7 +42,7 @@ func (conf *Config) GetSessionToken() (bool, error) {
|
||||
return conf.SetSessionTokenFromHeader(resp.Header)
|
||||
}
|
||||
|
||||
func (conf *Config) GetStatus() (*models.Status, error) {
|
||||
func (conf *Config) GetStatus() (*json_model.Status, error) {
|
||||
getResp, err := http.Get(fmt.Sprintf("http://%s/api/status", conf.Host))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -55,7 +55,7 @@ func (conf *Config) GetStatus() (*models.Status, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var status models.Status
|
||||
var status json_model.Status
|
||||
err = json.Unmarshal(statusByte, &status)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user