generated from PenaSide/GolangTemplate
fix: перенёс логику получения чужой истории на апи2
This commit is contained in:
parent
ff6d9ce793
commit
98432999b6
BIN
buf-Linux-x86_64
BIN
buf-Linux-x86_64
Binary file not shown.
@ -509,7 +509,16 @@ func (api *API2) UpdateCurrencies(ctx echo.Context) error {
|
||||
// History
|
||||
|
||||
func (api *API2) GetHistory(ctx echo.Context, params GetHistoryParams) error {
|
||||
var userID string
|
||||
|
||||
if params.AccountID != nil && *params.AccountID != "" {
|
||||
userID = *params.AccountID
|
||||
} else {
|
||||
userID, _ = ctx.Get(models.AuthJWTDecodedUserIDKey).(string)
|
||||
}
|
||||
|
||||
dto := &history.GetHistories{
|
||||
UserID: userID,
|
||||
Type: params.Type,
|
||||
Pagination: &models.Pagination{
|
||||
Page: int64(*params.Page),
|
||||
|
Loading…
Reference in New Issue
Block a user