Skip to content
This repository has been archived by the owner on Sep 14, 2024. It is now read-only.

Commit

Permalink
Revert "Removed unused index.php"
Browse files Browse the repository at this point in the history
This reverts commit 597a243.
  • Loading branch information
Teifun2 committed Sep 23, 2022
1 parent e0998b7 commit f236de5
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docker/data/Recipes/problem/recipe.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
"dateModified": "2021-10-30T16:02:47+0000",
"dateCreated": "2021-10-30T16:02:22+0000",
"printImage": false,
"imageUrl": "\/apps\/cookbook\/recipes\/128051\/image?size=full"
"imageUrl": "\/index.php\/apps\/cookbook\/recipes\/128051\/image?size=full"
}
3 changes: 2 additions & 1 deletion lib/src/services/authentication_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ class AuthenticationProvider {
String basicAuth,
bool isSelfSignedCertificate,
) async {
String urlAuthCheck = serverUrl + '/apps/cookbook/api/v1/categories';
String urlAuthCheck =
serverUrl + '/index.php/apps/cookbook/api/v1/categories';

dio.Response response;
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/services/categories_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CategoriesProvider {
UserRepository().getCurrentAppAuthentication();

final String url =
"${appAuthentication.server}/apps/cookbook/api/v1/categories";
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/categories";

// Parse categories
try {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/services/category_recipes_short_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CategoryRecipesShortProvider {
? "_"
: category; // Mapping from * to _ for recipes without a category!
url =
"${appAuthentication.server}/apps/cookbook/api/v1/category/$category";
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/category/$category";
}

// Parse categories
Expand Down
8 changes: 4 additions & 4 deletions lib/src/services/recipe_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class RecipeProvider {
UserRepository().getCurrentAppAuthentication();

final String url =
"${appAuthentication.server}/apps/cookbook/api/v1/recipes/$id";
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/recipes/$id";
// Parse categories
try {
String contents = await Network().get(url);
Expand All @@ -29,7 +29,7 @@ class RecipeProvider {

try {
final String url =
"${appAuthentication.server}/apps/cookbook/api/v1/recipes/${recipe.id}";
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/recipes/${recipe.id}";
var response = await client.put(url,
data: recipe.toJson(),
options: new Options(
Expand All @@ -50,7 +50,7 @@ class RecipeProvider {

try {
var response = await client.post(
"${appAuthentication.server}/apps/cookbook/api/v1/recipes",
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/recipes",
data: recipe.toJson(),
options: new Options(
contentType: "application/json;charset=UTF-8",
Expand All @@ -68,7 +68,7 @@ class RecipeProvider {

try {
var response = await client.post(
"${appAuthentication.server}/apps/cookbook/api/v1/import",
"${appAuthentication.server}/index.php/apps/cookbook/api/v1/import",
data: {"url": url},
options: new Options(
contentType: "application/json;charset=UTF-8",
Expand Down
2 changes: 1 addition & 1 deletion lib/src/services/recipes_short_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class RecipesShortProvider {
AppAuthentication appAuthentication =
UserRepository().getCurrentAppAuthentication();

final String url = "${appAuthentication.server}/apps/cookbook/api/v1/recipes";
final String url = "${appAuthentication.server}/index.php/apps/cookbook/api/v1/recipes";
try {
String contents = await Network().get(url);
return RecipeShort.parseRecipesShort(contents);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/services/version_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class VersionProvider {
UserRepository().getCurrentAppAuthentication();

var response = await appAuthentication.authenticatedClient
.get("${appAuthentication.server}/apps/cookbook/api/version");
.get("${appAuthentication.server}/index.php/apps/cookbook/api/version");

if (response.statusCode == 200 &&
!response.data.toString().startsWith("<!DOCTYPE html>")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class AuthenticationCachedNetworkRecipeImage extends StatelessWidget {

return AuthenticationCachedNetworkImage(
url:
'${appAuthentication.server}/apps/cookbook/api/v1/recipes/$recipeId/image?size=$settings',
'${appAuthentication.server}/index.php/apps/cookbook/api/v1/recipes/$recipeId/image?size=$settings',
width: width,
height: height,
boxFit: boxFit,
Expand Down

0 comments on commit f236de5

Please sign in to comment.