数据模型使用指针类型字段以避免空值自动更新的问题
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"log/slog"
|
||||
"platform/pkg/u"
|
||||
auth2 "platform/web/auth"
|
||||
client2 "platform/web/domains/client"
|
||||
m "platform/web/models"
|
||||
@@ -328,8 +329,8 @@ func Introspect(c *fiber.Ctx) error {
|
||||
if profile.Phone != "" {
|
||||
profile.Phone = maskPhone(profile.Phone)
|
||||
}
|
||||
if profile.IDNo != "" {
|
||||
profile.IDNo = maskIdNo(profile.IDNo)
|
||||
if profile.IDNo != nil && *profile.IDNo != "" {
|
||||
profile.IDNo = u.P(maskIdNo(*profile.IDNo))
|
||||
}
|
||||
return c.JSON(IntrospectResp{*profile})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user