Skip to content

Commit

Permalink
feat(#86-change-requests-type): change some requests type in endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
y9Kap committed Dec 26, 2023
1 parent 2ffd9e5 commit 7377014
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ internal class FriendsEngine(
suspend fun delete(request: DeleteFriendRequest) {
val url = baseUrl / "delete"
val body = request.toBody()
httpClient.post(url.string) {
httpClient.delete(url.string) {
apiVersion(request.apiVersion)
token(request.token)
setBody(body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@ import app.meetacy.sdk.types.serializable.user.type
import app.meetacy.sdk.types.url.Url
import io.ktor.client.HttpClient
import io.ktor.client.call.body
import io.ktor.client.request.get
import io.ktor.client.request.post
import io.ktor.client.request.setBody
import io.ktor.client.request.*
import kotlinx.serialization.Serializable

internal class MeetingsEngine(
Expand Down Expand Up @@ -199,7 +197,7 @@ internal class MeetingsEngine(
suspend fun editMeeting(request: EditMeetingRequest): EditMeetingRequest.Response = with(request) {
val url = baseUrl / "edit"
val body = request.toBody()
val response = httpClient.post(url.string) {
val response = httpClient.put(url.string) {
apiVersion(request.apiVersion)
token(request.token)
setBody(body)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ internal class UsersEngine(
suspend fun editUser(request: EditUserRequest): EditUserRequest.Response {
val url = baseUrl / "edit"
val body = request.toBody()
val response = httpClient.post(url.string) {
val response = httpClient.put(url.string) {
apiVersion(request.apiVersion)
token(request.token)
setBody(body)
Expand Down

0 comments on commit 7377014

Please sign in to comment.