update user command

This commit is contained in:
AndrewZuo01 2023-12-12 16:41:14 +08:00
parent b1ce59be3b
commit 4c34647ccf

View File

@ -116,7 +116,8 @@ func (u *UserMgo) GetUserCommands(ctx context.Context, userID string, Type int32
}
defer cursor.Close(ctx)
var commands []user.CommandInfoResp
// Initialize commands as an empty slice
commands := []user.CommandInfoResp{}
for cursor.Next(ctx) {
var document struct {