From a5b0c582c889bcf8889a608b8a293f6c6254235c Mon Sep 17 00:00:00 2001 From: M M Arif Date: Thu, 12 May 2022 18:08:46 +0500 Subject: [PATCH] Fix file path encoding and clean up --- .../java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java | 2 +- .../main/java/org/gitnex/tea4j/v2/apis/custom/OTPApi.java | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java index 6b1fbbf..ac4e4f4 100644 --- a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java +++ b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/CustomApi.java @@ -12,7 +12,7 @@ public interface CustomApi { Call> repoGetContentsList( @Path("owner") String owner, @Path("repo") String repo, - @Path("filepath") String filepath, + @Path(value = "filepath", encoded = false) String filepath, @Query("ref") String ref); /** diff --git a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/OTPApi.java b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/OTPApi.java index 49fded9..8588ecc 100644 --- a/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/OTPApi.java +++ b/custom/src/main/java/org/gitnex/tea4j/v2/apis/custom/OTPApi.java @@ -33,11 +33,4 @@ public interface OTPApi { @Header("X-Gitea-OTP") int otp, @Path("username") String username, @Body CreateAccessTokenOption body); - - @GET("repos/{owner}/{repo}/contents/{filepath}") - Call> repoGetContentsList( - @Path("owner") String owner, - @Path("repo") String repo, - @Path("filepath") String filepath, - @Query("ref") String ref); }