mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
DELETE license API endpoint (#3697)
* DELETE license API endpoint Signed-off-by: Spike Curtis <spike@coder.com> * Fix new lint stuff Signed-off-by: Spike Curtis <spike@coder.com> Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
@@ -475,6 +475,19 @@ func (q *sqlQuerier) UpdateGitSSHKey(ctx context.Context, arg UpdateGitSSHKeyPar
|
||||
return err
|
||||
}
|
||||
|
||||
const deleteLicense = `-- name: DeleteLicense :one
|
||||
DELETE
|
||||
FROM licenses
|
||||
WHERE id = $1
|
||||
RETURNING id
|
||||
`
|
||||
|
||||
func (q *sqlQuerier) DeleteLicense(ctx context.Context, id int32) (int32, error) {
|
||||
row := q.db.QueryRowContext(ctx, deleteLicense, id)
|
||||
err := row.Scan(&id)
|
||||
return id, err
|
||||
}
|
||||
|
||||
const getLicenses = `-- name: GetLicenses :many
|
||||
SELECT id, uploaded_at, jwt, exp
|
||||
FROM licenses
|
||||
|
||||
Reference in New Issue
Block a user