feat: update
This commit is contained in:
@@ -150,7 +150,7 @@ func (m *postsModel) List(ctx context.Context, pagination *requests.Pagination,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (m *postsModel) IsUserBought(ctx context.Context, userId int64, postId int64) (bool, error) {
|
||||
func (m *postsModel) IsUserBought(ctx context.Context, userId, postId int64) (bool, error) {
|
||||
tbl := table.UserPosts
|
||||
stmt := tbl.
|
||||
SELECT(tbl.ID).
|
||||
@@ -175,7 +175,7 @@ func (m *postsModel) IsUserBought(ctx context.Context, userId int64, postId int6
|
||||
return userPost.ID > 0, nil
|
||||
}
|
||||
|
||||
func (m *postsModel) Buy(ctx context.Context, userId int64, postId int64) error {
|
||||
func (m *postsModel) Buy(ctx context.Context, userId, postId int64) error {
|
||||
tbl := table.UserPosts
|
||||
|
||||
post, err := m.GetByID(ctx, postId)
|
||||
|
||||
Reference in New Issue
Block a user