Skip to content

Commit

Permalink
refactor: realEMoji rename(depromeet#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
akrudal committed Jun 7, 2024
1 parent 735a744 commit 4edce5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import Domain
import Alamofire
import RxSwift

typealias RealEmojiAPIWorker = RealEmojiAPIS.Worker
extension RealEmojiAPIS {
typealias RealEmojiAPIWorker = RealEmojiAPIs.Worker
extension RealEmojiAPIs {
public final class Worker: APIWorker {
static let queue = {
ConcurrentDispatchQueueScheduler(queue: DispatchQueue(label: "RealEmojiAPIQueue", qos: .utility))
Expand Down Expand Up @@ -43,7 +43,7 @@ extension RealEmojiAPIWorker {

func fetchRealEmoji(query: FetchRealEmojiQuery) -> Single<[FetchedEmojiData]?> {
let query = FetchRealEmojiListParameter(postId: query.postId)
let spec = RealEmojiAPIS.fetchRealEmojiList(query).spec
let spec = RealEmojiAPIs.fetchRealEmojiList(query).spec

return request(spec: spec, headers: headers)
.subscribe(on: Self.queue)
Expand All @@ -61,7 +61,7 @@ extension RealEmojiAPIWorker {
}

func fetchMyRealEmoji() -> Single<[MyRealEmoji?]> {
let spec = RealEmojiAPIS.fetchMyRealEmoji.spec
let spec = RealEmojiAPIs.fetchMyRealEmoji.spec

return request(spec: spec, headers: headers)
.subscribe(on: Self.queue)
Expand All @@ -79,7 +79,7 @@ extension RealEmojiAPIWorker {
}

func addRealEmoji(query: AddEmojiQuery, body: AddEmojiBody) -> Single<Void?> {
let spec = RealEmojiAPIS.addRealEmoji(.init(postId: query.postId)).spec
let spec = RealEmojiAPIs.addRealEmoji(.init(postId: query.postId)).spec
let body = AddRealEmojiRequestDTO(realEmojiId: body.emojiId)

return request(spec: spec, headers: headers, jsonEncodable: body)
Expand All @@ -98,7 +98,7 @@ extension RealEmojiAPIWorker {
}

func removeRealEmoji(query: RemoveRealEmojiQuery) -> Single<Void?> {
let spec = RealEmojiAPIS.removeRealEmoji(.init(postId: query.postId, realEmojiId: query.realEmojiId)).spec
let spec = RealEmojiAPIs.removeRealEmoji(.init(postId: query.postId, realEmojiId: query.realEmojiId)).spec

return request(spec: spec, headers: headers)
.subscribe(on: Self.queue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Core
import Foundation

enum RealEmojiAPIS: API {
enum RealEmojiAPIs: API {
case fetchRealEmojiList(FetchRealEmojiListParameter)
case fetchMyRealEmoji
case addRealEmoji(AddRealEmojiParameters)
Expand Down

0 comments on commit 4edce5c

Please sign in to comment.