Skip to content

Commit 00909b9

Browse files
committed
✨ Init add avatar field
1 parent be35773 commit 00909b9

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

‎controller/initctl.go‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ func showInitPageAction(c *gin.Context) {
4242
}
4343

4444
type initRequest struct {
45-
Name string `json:"name" binding:"required"`
46-
Email string `json:"email" binding:"required"`
47-
B3Key string `json:"b3key" binding:"required"`
45+
Name string `json:"name" binding:"required"`
46+
B3Key string `json:"b3key" binding:"required"`
47+
AvatarURL string `json:"avatarURL" binding:"required"`
4848
}
4949

5050
func initAction(c *gin.Context) {
@@ -60,8 +60,9 @@ func initAction(c *gin.Context) {
6060
}
6161

6262
platformAdmin := &model.User{
63-
Name: reqData.Name,
64-
B3Key: reqData.B3Key,
63+
Name: reqData.Name,
64+
B3Key: reqData.B3Key,
65+
AvatarURL: reqData.AvatarURL,
6566
}
6667

6768
if err := service.Init.InitPlatform(platformAdmin); nil != err {

0 commit comments

Comments
 (0)