Skip to content

Commit

Permalink
[Feat] #520 -이미지 API 구현
Browse files Browse the repository at this point in the history
  • Loading branch information
yju0808 committed Apr 21, 2024
1 parent 5905422 commit b254138
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 175 deletions.
6 changes: 3 additions & 3 deletions HappyAnding/HappyAnding/Model/Answer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct Answer: Identifiable, Codable, Equatable, Hashable {
var likedBy: [String:Bool]
var likeCount: Int

init(content: String, author: String, postId:String, images: [String] = [], thumbnailImages: [String] = []) {
init(content: String, author: String, postId:String) {

self.id = UUID().uuidString
self.createdAt = Date().getDate()
Expand All @@ -30,8 +30,8 @@ struct Answer: Identifiable, Codable, Equatable, Hashable {
self.isAccepted = false
self.author = author
self.postId = postId
self.images = images
self.thumbnailImages = thumbnailImages
self.images = []
self.thumbnailImages = []

self.likeCount = 0
self.likedBy = [:]
Expand Down
6 changes: 3 additions & 3 deletions HappyAnding/HappyAnding/Model/Post.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct Post: Identifiable, Codable, Equatable, Hashable {
var likeCount: Int
var commentCount: Int

init(type: PostType, content: String, author: String, shortcuts: [String] = [], images: [String] = [], thumbnailImages: [String] = []) {
init(type: PostType, content: String, author: String, shortcuts: [String] = []) {

self.id = UUID().uuidString
self.createdAt = Date().getDate()
Expand All @@ -31,8 +31,8 @@ struct Post: Identifiable, Codable, Equatable, Hashable {
self.content = content
self.author = author
self.shortcuts = shortcuts
self.images = images
self.thumbnailImages = thumbnailImages
self.images = []
self.thumbnailImages = []

self.likeCount = 0
self.commentCount = 0
Expand Down
Loading

0 comments on commit b254138

Please sign in to comment.