s/ListResponseModel/ModelResponse/
This commit is contained in:
parent
bc3e21fdc6
commit
0f541a0367
2 changed files with 4 additions and 4 deletions
|
@ -88,10 +88,10 @@ type PushRequest struct {
|
|||
}
|
||||
|
||||
type ListResponse struct {
|
||||
Models []ListResponseModel `json:"models"`
|
||||
Models []ModelResponse `json:"models"`
|
||||
}
|
||||
|
||||
type ListResponseModel struct {
|
||||
type ModelResponse struct {
|
||||
Name string `json:"name"`
|
||||
ModifiedAt time.Time `json:"modified_at"`
|
||||
Size int `json:"size"`
|
||||
|
|
|
@ -365,7 +365,7 @@ func DeleteModelHandler(c *gin.Context) {
|
|||
}
|
||||
|
||||
func ListModelsHandler(c *gin.Context) {
|
||||
var models []api.ListResponseModel
|
||||
var models []api.ModelResponse
|
||||
fp, err := GetManifestPath()
|
||||
if err != nil {
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
|
||||
|
@ -398,7 +398,7 @@ func ListModelsHandler(c *gin.Context) {
|
|||
log.Printf("skipping file: %s", fp)
|
||||
return nil
|
||||
}
|
||||
model := api.ListResponseModel{
|
||||
model := api.ModelResponse{
|
||||
Name: mp.GetShortTagname(),
|
||||
Size: manifest.GetTotalSize(),
|
||||
Digest: digest,
|
||||
|
|
Loading…
Reference in a new issue