Review failed
This commit is contained in:
@@ -686,6 +686,15 @@ func (s *Store) SetMergingBy(ctx context.Context, id, login string) error {
|
||||
})
|
||||
}
|
||||
|
||||
func (s *Store) MergingBy(ctx context.Context, id string) (string, error) {
|
||||
login := ""
|
||||
err := s.db.QueryRowContext(ctx, `SELECT merging_by FROM tasks WHERE id = ?`, id).Scan(&login)
|
||||
if errors.Is(err, sql.ErrNoRows) {
|
||||
return "", ErrNotFound
|
||||
}
|
||||
return login, err
|
||||
}
|
||||
|
||||
func (s *Store) TakeMergingBy(ctx context.Context, id string) (string, error) {
|
||||
login := ""
|
||||
err := s.write(ctx, func(tx *sql.Tx, emit emitFunc) error {
|
||||
|
||||
Reference in New Issue
Block a user