We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 748ce4a commit a0b6b69Copy full SHA for a0b6b69
Sources/AppwriteModels/AlgoArgon2.swift
@@ -65,10 +65,10 @@ open class AlgoArgon2: Codable {
65
66
public static func from(map: [String: Any] ) -> AlgoArgon2 {
67
return AlgoArgon2(
68
- type: map["type"] as? String ?? "",
69
- memoryCost: map["memoryCost"] as? Int ?? 0,
70
- timeCost: map["timeCost"] as? Int ?? 0,
71
- threads: map["threads"] as? Int ?? 0
+ type: map["type"] as! String,
+ memoryCost: map["memoryCost"] as! Int,
+ timeCost: map["timeCost"] as! Int,
+ threads: map["threads"] as! Int
72
)
73
}
74
Sources/AppwriteModels/AlgoBcrypt.swift
@@ -38,7 +38,7 @@ open class AlgoBcrypt: Codable {
38
39
public static func from(map: [String: Any] ) -> AlgoBcrypt {
40
return AlgoBcrypt(
41
- type: map["type"] as? String ?? ""
+ type: map["type"] as! String
42
43
44
Sources/AppwriteModels/AlgoMd5.swift
@@ -38,7 +38,7 @@ open class AlgoMd5: Codable {
public static func from(map: [String: Any] ) -> AlgoMd5 {
return AlgoMd5(
Sources/AppwriteModels/AlgoPhpass.swift
@@ -38,7 +38,7 @@ open class AlgoPhpass: Codable {
public static func from(map: [String: Any] ) -> AlgoPhpass {
return AlgoPhpass(
Sources/AppwriteModels/AlgoScrypt.swift
@@ -74,11 +74,11 @@ open class AlgoScrypt: Codable {
75
public static func from(map: [String: Any] ) -> AlgoScrypt {
76
return AlgoScrypt(
77
78
- costCpu: map["costCpu"] as? Int ?? 0,
79
- costMemory: map["costMemory"] as? Int ?? 0,
80
- costParallel: map["costParallel"] as? Int ?? 0,
81
- length: map["length"] as? Int ?? 0
+ costCpu: map["costCpu"] as! Int,
+ costMemory: map["costMemory"] as! Int,
+ costParallel: map["costParallel"] as! Int,
+ length: map["length"] as! Int
82
83
84
Sources/AppwriteModels/AlgoScryptModified.swift
@@ -65,10 +65,10 @@ open class AlgoScryptModified: Codable {
public static func from(map: [String: Any] ) -> AlgoScryptModified {
return AlgoScryptModified(
- salt: map["salt"] as? String ?? "",
- saltSeparator: map["saltSeparator"] as? String ?? "",
- signerKey: map["signerKey"] as? String ?? ""
+ salt: map["salt"] as! String,
+ saltSeparator: map["saltSeparator"] as! String,
+ signerKey: map["signerKey"] as! String
Sources/AppwriteModels/AlgoSha.swift
@@ -38,7 +38,7 @@ open class AlgoSha: Codable {
public static func from(map: [String: Any] ) -> AlgoSha {
return AlgoSha(
Sources/AppwriteModels/AttributeBoolean.swift
@@ -110,14 +110,14 @@ open class AttributeBoolean: Codable {
110
111
public static func from(map: [String: Any] ) -> AttributeBoolean {
112
return AttributeBoolean(
113
- key: map["key"] as? String ?? "",
114
115
- status: map["status"] as? String ?? "",
116
- error: map["error"] as? String ?? "",
117
- `required`: map["required"] as? Bool ?? false,
+ key: map["key"] as! String,
+ status: map["status"] as! String,
+ error: map["error"] as! String,
+ `required`: map["required"] as! Bool,
118
array: map["array"] as? Bool,
119
- createdAt: map["$createdAt"] as? String ?? "",
120
- updatedAt: map["$updatedAt"] as? String ?? "",
+ createdAt: map["$createdAt"] as! String,
+ updatedAt: map["$updatedAt"] as! String,
121
`default`: map["default"] as? Bool
122
123
Sources/AppwriteModels/AttributeDatetime.swift
@@ -119,15 +119,15 @@ open class AttributeDatetime: Codable {
public static func from(map: [String: Any] ) -> AttributeDatetime {
return AttributeDatetime(
124
125
126
127
128
129
130
- format: map["format"] as? String ?? "",
+ format: map["format"] as! String,
131
`default`: map["default"] as? String
132
133
Sources/AppwriteModels/AttributeEmail.swift
@@ -119,15 +119,15 @@ open class AttributeEmail: Codable {
public static func from(map: [String: Any] ) -> AttributeEmail {
return AttributeEmail(
0 commit comments