Skip to content

Commit

Permalink
chore/#95 :: RoomService Data->Domain으로 변경
Browse files Browse the repository at this point in the history
ConnectionRepository에서 하나만 들고 있어도 되겠다고 판단해 RoomService를 도메인으로 옮겨 ConnectionRepository에서 알 수 있도록 했습니다.
Co-Authored-By: Kiyoung <[email protected]>
  • Loading branch information
youn9k committed Nov 25, 2024
1 parent 596dc67 commit dc42cb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation
import PhotoGetherNetwork
import PhotoGetherDomainInterface

public final class RoomServiceImpl: RoomService {
private let decoder = JSONDecoder()
Expand All @@ -10,8 +11,9 @@ public final class RoomServiceImpl: RoomService {
self.webSocketClient = webSocketClient
}

public func send(request: any WebSocketRequestable) {
guard let data = request.toData(encoder: encoder) else {
public func send(request: Encodable) {
guard let request = request as? (any WebSocketRequestable),
let data = request.toData(encoder: encoder) else {
debugPrint("방 생성 요청 데이터 인코딩 실패: \(request)")
return
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import Foundation

public protocol RoomService {
func send(request: Encodable)
}

0 comments on commit dc42cb6

Please sign in to comment.