Skip to content

Commit 3248198

Browse files
authoredFeb 27, 2025
Merge pull request #4 from Nuxify/feature/include-walletaddress-response
feat(user): include wallet address in response for create user endpoint
2 parents 6e30f70 + b5bcd36 commit 3248198

File tree

5 files changed

+15
-8
lines changed

5 files changed

+15
-8
lines changed
 

‎docs/openapi.json

+3
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,9 @@
548548
"CreateUserResponse": {
549549
"type": "object",
550550
"properties": {
551+
"walletAddress": {
552+
"type": "string"
553+
},
551554
"sss2": {
552555
"type": "string"
553556
},

‎module/user/infrastructure/service/UserCommandService.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@ func (service *UserCommandService) CreateUser(ctx context.Context, data types.Cr
108108
}
109109

110110
return types.CreateUserResult{
111-
SSS2: sss2,
112-
SSS3: sss3,
111+
WalletAddress: publicAddress,
112+
SSS2: sss2,
113+
SSS3: sss3,
113114
}, nil
114115
}
115116

‎module/user/infrastructure/service/types/dto.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ type CreateUser struct {
77
}
88

99
type CreateUserResult struct {
10-
SSS2 string
11-
SSS3 string
10+
WalletAddress string
11+
SSS2 string
12+
SSS3 string
1213
}
1314

1415
type UpdateUser struct {

‎module/user/interfaces/http/dto.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ type UpdateUserPasswordRequest struct {
3636
}
3737

3838
type CreateUserResponse struct {
39-
SSS2 string `json:"sss2"`
40-
SSS3 string `json:"sss3"`
39+
WalletAddress string `json:"walletAddress"`
40+
SSS2 string `json:"sss2"`
41+
SSS3 string `json:"sss3"`
4142
}
4243

4344
type GetUserResponse struct {

‎module/user/interfaces/http/rest/UserCommandController.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ func (controller *UserCommandController) CreateUser(w http.ResponseWriter, r *ht
101101
Success: true,
102102
Message: "Successfully created user.",
103103
Data: &types.CreateUserResponse{
104-
SSS2: res.SSS2,
105-
SSS3: res.SSS3,
104+
WalletAddress: res.WalletAddress,
105+
SSS2: res.SSS2,
106+
SSS3: res.SSS3,
106107
},
107108
}
108109

0 commit comments

Comments
 (0)
Please sign in to comment.