-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ (ContentKit): Activity - Add createdAt, lastEditedAt properties
- Loading branch information
Showing
3 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,8 @@ public struct Activity: Decodable, Identifiable { | |
|
||
self.uuid = try container.decode(String.self, forKey: .uuid) | ||
self.name = try container.decode(String.self, forKey: .name) | ||
self.createdAt = try container.decode(Date.self, forKey: .createdAt) | ||
self.lastEditedAt = try container.decode(Date.self, forKey: .lastEditedAt) | ||
self.status = try container.decode(Status.self, forKey: .status) | ||
|
||
self.authors = try container.decode([String].self, forKey: .authors) | ||
|
@@ -38,6 +40,8 @@ public struct Activity: Decodable, Identifiable { | |
|
||
public let uuid: String | ||
public let name: String | ||
public let createdAt: Date | ||
public let lastEditedAt: Date | ||
public let status: Status | ||
|
||
public let authors: [String] // TODO: (@ladislas) - implement authors | ||
Check warning on line 47 in Modules/ContentKit/Sources/Activity/Activity.swift GitHub Actions / swiftlint
|
||
|
@@ -72,12 +76,14 @@ public struct Activity: Decodable, Identifiable { | |
private enum CodingKeys: String, CodingKey { | ||
case uuid | ||
case name | ||
case createdAt = "created_at" | ||
case lastEditedAt = "last_edited_at" | ||
case status | ||
case authors | ||
case skills | ||
case hmi | ||
case types | ||
case tags | ||
case status | ||
case locales | ||
case l10n | ||
case exercicesPayload = "exercises_payload" | ||
|