From ea9643bcb291e0487a572db382c9b882f9956e0b Mon Sep 17 00:00:00 2001 From: Zsolt Tasnadi Date: Sun, 1 Mar 2026 19:56:46 +0100 Subject: [PATCH] json output fix --- domain/model.release.go | 10 +++++----- domain/service.software.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/domain/model.release.go b/domain/model.release.go index 3ca4a59..f13df63 100644 --- a/domain/model.release.go +++ b/domain/model.release.go @@ -4,10 +4,10 @@ import "gorm.io/gorm" type Release struct { gorm.Model - SoftwareID uint `gorm:"index" json:"software_id"` + SoftwareID uint `gorm:"index" json:"softwareId"` Version string `gorm:"size:64" json:"version"` - CartridgePath string `gorm:"size:255" json:"-"` - SourcePath string `gorm:"size:255" json:"-"` - HTMLFolderPath string `gorm:"size:255" json:"-"` - DocsFolderPath string `gorm:"size:255" json:"-"` + CartridgePath string `gorm:"size:255" json:"cartridgePath"` + SourcePath string `gorm:"size:255" json:"sourcePath"` + HTMLFolderPath string `gorm:"size:255" json:"htmlFolderPath"` + DocsFolderPath string `gorm:"size:255" json:"docsFolderPath"` } diff --git a/domain/service.software.go b/domain/service.software.go index 8f87e5b..08a1b22 100644 --- a/domain/service.software.go +++ b/domain/service.software.go @@ -11,14 +11,14 @@ type SoftwareListDTO struct { } type SoftwareDetaildListDTO struct { - Softwares []SoftwareShowData + Softwares []SoftwareShowData `json:"softwares"` } type SoftwareShowData struct { - Software *Software - Releases []Release - LatestRelease *Release - WebPlayableRelease *Release + Software *Software `json:"software"` + Releases []Release `json:"releases"` + LatestRelease *Release `json:"latestRelease"` + WebPlayableRelease *Release `json:"webPlayableRelease"` } type SoftwareServiceInterface interface {