Skip to content

Commit

Permalink
fix: send request body on DELETE /users/me
Browse files Browse the repository at this point in the history
  • Loading branch information
bouassaba committed Nov 23, 2024
1 parent 24377cc commit fb5452f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/IdentityUser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ public struct VOIdentityUser {
}
}

public func delete(_: DeleteOptions) async throws {
try await withCheckedThrowingContinuation { continuation in
public func delete(_ options: DeleteOptions) async throws {
try await withCheckedThrowingContinuation { (continuation: CheckedContinuation<Void, any Error>) in
var request = URLRequest(url: urlForMe())
request.httpMethod = "DELETE"
request.appendAuthorizationHeader(accessToken)
request.setJSONBody(options, continuation: continuation)
let task = URLSession.shared.dataTask(with: request) { data, response, error in
handleEmptyResponse(
continuation: continuation,
Expand Down

0 comments on commit fb5452f

Please sign in to comment.