Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
backend change adaoptions
Browse files Browse the repository at this point in the history
  • Loading branch information
mltbnz committed Mar 29, 2023
1 parent 7638090 commit b28c207
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 24 deletions.
14 changes: 3 additions & 11 deletions WegliKit/Sources/ApiClient/Services/APIService.swift
Expand Up @@ -49,10 +49,8 @@ extension APIService: DependencyKey {

return try data.decoded(decoder: .noticeDecoder)
},
postNotice: { input in
let noticePutRequestBody = NoticePutRequestBody(notice: input)
let body = try noticePutRequestBody.encoded(encoder: .noticeEncoder)

postNotice: { notice in
let body = try notice.encoded(encoder: .noticeEncoder)
let data = try await apiClient.send(.post(.notices, body: body))

return try data.decoded(decoder: .noticeDecoder)
Expand All @@ -72,9 +70,7 @@ extension APIService: DependencyKey {
return try data.decoded(decoder: .noticeDecoder)
},
patchNotice: { notice in
let input = NoticePatchInput(notice: notice)
let body = try input.encoded(encoder: .noticeEncoder)

let body = try notice.encoded(encoder: .noticeEncoder)
let data = try await apiClient.send(.patch(.updateNotice(token: notice.id), body: body))

return try data.decoded(decoder: .noticeDecoder)
Expand All @@ -90,10 +86,6 @@ extension APIService: DependencyKey {
}
}

struct NoticePatchInput: Encodable, Equatable {
let notice: Notice
}

extension APIService: TestDependencyKey {
public static let noop = Self(
getNotices: { _ in
Expand Down

This file was deleted.

8 changes: 4 additions & 4 deletions weg-li.xcodeproj/project.pbxproj
Expand Up @@ -650,7 +650,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 230329;
DEVELOPMENT_ASSET_PATHS = "weg-li/iOS\\ App/Resources/Preview\\ Content";
DEVELOPMENT_TEAM = QDDL89SBZ7;
ENABLE_BITCODE = NO;
Expand All @@ -660,7 +660,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = li.weg.app.ios;
PRODUCT_NAME = "weg-li";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -675,7 +675,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 3;
CURRENT_PROJECT_VERSION = 230329;
DEVELOPMENT_ASSET_PATHS = "weg-li/iOS\\ App/Resources/Preview\\ Content";
DEVELOPMENT_TEAM = QDDL89SBZ7;
ENABLE_BITCODE = NO;
Expand All @@ -685,7 +685,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.1;
MARKETING_VERSION = 1.1.2;
PRODUCT_BUNDLE_IDENTIFIER = li.weg.app.ios;
PRODUCT_NAME = "weg-li";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down

0 comments on commit b28c207

Please sign in to comment.