Skip to content

Commit

Permalink
Revert "StampWithThumbnail修正"
Browse files Browse the repository at this point in the history
This reverts commit 6fde0ca.
  • Loading branch information
azbcww committed Nov 27, 2023
1 parent 5cff7cb commit d2b5d5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion repository/gorm/stamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,13 @@ func (r *stampRepository) StampThumbnailExists(stamps []*model.Stamp) (stampsWit
for _, s := range stamps {
_, ok := tm[s.FileID]
stampsWithThumb = append(stampsWithThumb, repository.StampWithThumbnail{
Stamp: s,
ID: s.ID,
Name: s.Name,
CreatorID: s.CreatorID,
FileID: s.FileID,
IsUnicode: s.IsUnicode,
CreatedAt: s.CreatedAt,
UpdatedAt: s.UpdatedAt,
HasThumbnail: ok,
})
}
Expand Down
10 changes: 8 additions & 2 deletions repository/stamp.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ type StampStats struct {
}

type StampWithThumbnail struct {
*model.Stamp
HasThumbnail bool `json:"hasThumbnail"`
ID uuid.UUID `json:"id"`
Name string `json:"name"`
CreatorID uuid.UUID `json:"creatorId"`
FileID uuid.UUID `json:"fileId"`
IsUnicode bool `json:"isUnicode"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
HasThumbnail bool `json:"hasThumbnail"`
}

// StampType スタンプの種類
Expand Down

0 comments on commit d2b5d5c

Please sign in to comment.