Recipe creation, editing and deletion are now supported

This commit is contained in:
Vicnet
2023-10-04 11:23:05 +02:00
parent 77c07bb0b1
commit 85a8e631d0
14 changed files with 453 additions and 146 deletions

View File

@@ -13,6 +13,10 @@ struct Category: Codable {
let recipe_count: Int
}
extension Category: Identifiable, Hashable {
var id: String { name }
}
struct Recipe: Codable {
let name: String
let keywords: String
@@ -23,6 +27,10 @@ struct Recipe: Codable {
let recipe_id: Int
}
extension Recipe: Identifiable, Hashable {
var id: String { name }
}
struct RecipeDetail: Codable {
var name: String
var keywords: String
@@ -140,3 +148,9 @@ struct MetaData: Codable {
let status: String
let statuscode: Int
}
// Networking
struct ServerMessage: Decodable {
let msg: String
}