Release Candidate Version 1.6

This commit is contained in:
Vicnet
2023-12-15 13:43:56 +01:00
parent 222685e05d
commit bb68b29bdf
16 changed files with 1020 additions and 275 deletions

View File

@@ -496,11 +496,24 @@ import UIKit
recipe: recipeDetail
)
}
if let error = error {
if error != nil {
return .REQUEST_DROPPED
}
return nil
}
func importRecipe(url: String) async -> (RecipeDetail?, RequestAlert?) {
guard let data = JSONEncoder.safeEncode(RecipeImportRequest(url: url)) else { return (nil, .REQUEST_DROPPED) }
let (recipeDetail, error) = await api.importRecipe(
from: userSettings.serverAddress,
auth: userSettings.authString,
data: data
)
if error != nil {
return (nil, .REQUEST_DROPPED)
}
return (recipeDetail, nil)
}
}