createIngredient

abstract suspend fun createIngredient(name: String, quantity: Int): RepositoryResponse<Ingredient>

Return

the ingredient created and WarehouseMessage.OK if the new ingredient has been successfully added, otherwise it returns null and WarehouseMessage.ERROR_INGREDIENT_ALREADY_EXISTS

Parameters

name

of the new ingredient

quantity

of the new ingredient