style: UDM数据导出代码格式

This commit is contained in:
TsMask
2025-04-25 15:49:20 +08:00
parent eaf95cadf2
commit 357289c491
4 changed files with 7 additions and 13 deletions

View File

@@ -497,8 +497,7 @@ func (s *UDMAuthController) Export(c *gin.Context) {
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc})
}
// 输出到文件
err := file.WriterFileCSV(data, filePath)
if err != nil {
if err := file.WriterFileCSV(data, filePath); err != nil {
c.JSON(200, resp.ErrMsg(err.Error()))
return
}
@@ -515,7 +514,6 @@ func (s *UDMAuthController) Export(c *gin.Context) {
data = append(data, []string{v.IMSI, v.Ki, v.AlgoIndex, v.Amf, opc})
}
// 输出到文件
if err := file.WriterFileTXT(data, ",", filePath); err != nil {
c.JSON(200, resp.ErrMsg(err.Error()))
return