add repo methods for new queries
This commit is contained in:
parent
b752297075
commit
6dbbc07f9c
@ -62,3 +62,22 @@ func (r *TgRepo) GetAllTgAccounts(ctx context.Context) ([]model.TgAccount, error
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (r *TgRepo) UpdateStatusTg(ctx context.Context, id int64, status model.TgAccountStatus) error {
|
||||
err := r.queries.UpdateStatusTg(ctx, sqlcgen.UpdateStatusTgParams{
|
||||
Status: status,
|
||||
ID: id,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *TgRepo) SoftDeleteTgAccount(ctx context.Context, id int64) error {
|
||||
err := r.queries.SoftDeleteTgAccount(ctx, id)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user