add GetQidOwner query
This commit is contained in:
parent
88a0fe7e58
commit
33e5180c5f
@ -608,3 +608,6 @@ FROM
|
||||
question
|
||||
WHERE
|
||||
question.quiz_id = $1 AND deleted = false;
|
||||
|
||||
-- name: GetQidOwner :one
|
||||
SELECT accountid FROM quiz where qid=$1;
|
@ -307,3 +307,12 @@ func (r *AccountRepository) GetAccAndPrivilegeByEmail(ctx context.Context, email
|
||||
|
||||
return account, privileges, nil
|
||||
}
|
||||
|
||||
func (r *AccountRepository) GetQidOwner(ctx context.Context, qId string) (string, error) {
|
||||
userID, err := r.queries.GetQidOwner(ctx)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return userID, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user