add repo methods for new queries

This commit is contained in:
Pavel 2024-07-01 15:35:46 +03:00
parent b752297075
commit 6dbbc07f9c

@ -62,3 +62,22 @@ func (r *TgRepo) GetAllTgAccounts(ctx context.Context) ([]model.TgAccount, error
return result, nil 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
}