From c67ba5065b163d8b4bc7bddedc5a8b572892e600 Mon Sep 17 00:00:00 2001 From: Nikhil <118773738+pablohashescobar@users.noreply.github.com> Date: Wed, 10 Jan 2024 12:22:20 +0530 Subject: [PATCH] dev: update the instance urls (#3329) --- apiserver/plane/license/urls.py | 12 ++++++------ apiserver/plane/urls.py | 2 +- web/services/auth.service.ts | 2 +- web/services/instance.service.ts | 10 +++++----- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/apiserver/plane/license/urls.py b/apiserver/plane/license/urls.py index 807833a7e58..e6315e021da 100644 --- a/apiserver/plane/license/urls.py +++ b/apiserver/plane/license/urls.py @@ -10,32 +10,32 @@ urlpatterns = [ path( - "instances/", + "", InstanceEndpoint.as_view(), name="instance", ), path( - "instances/admins/", + "admins/", InstanceAdminEndpoint.as_view(), name="instance-admins", ), path( - "instances/admins//", + "admins//", InstanceAdminEndpoint.as_view(), name="instance-admins", ), path( - "instances/configurations/", + "configurations/", InstanceConfigurationEndpoint.as_view(), name="instance-configuration", ), path( - "instances/admins/sign-in/", + "admins/sign-in/", InstanceAdminSignInEndpoint.as_view(), name="instance-admin-sign-in", ), path( - "instances/admins/sign-up-screen-visited/", + "admins/sign-up-screen-visited/", SignUpScreenVisitedEndpoint.as_view(), name="instance-sign-up", ), diff --git a/apiserver/plane/urls.py b/apiserver/plane/urls.py index e437da0787f..669f3ea73de 100644 --- a/apiserver/plane/urls.py +++ b/apiserver/plane/urls.py @@ -12,7 +12,7 @@ path("", TemplateView.as_view(template_name="index.html")), path("api/", include("plane.app.urls")), path("api/public/", include("plane.space.urls")), - path("api/licenses/", include("plane.license.urls")), + path("api/instances/", include("plane.license.urls")), path("api/v1/", include("plane.api.urls")), path("", include("plane.web.urls")), ] diff --git a/web/services/auth.service.ts b/web/services/auth.service.ts index abbf07d684e..f47a5282428 100644 --- a/web/services/auth.service.ts +++ b/web/services/auth.service.ts @@ -119,7 +119,7 @@ export class AuthService extends APIService { } async instanceAdminSignIn(data: IPasswordSignInData): Promise { - return await this.post("/api/licenses/instances/admins/sign-in/", data, { headers: {} }) + return await this.post("/api/instances/admins/sign-in/", data, { headers: {} }) .then((response) => { if (response?.status === 200) { this.setAccessToken(response?.data?.access_token); diff --git a/web/services/instance.service.ts b/web/services/instance.service.ts index 9738d9d758e..1bc5ecdbcee 100644 --- a/web/services/instance.service.ts +++ b/web/services/instance.service.ts @@ -10,7 +10,7 @@ export class InstanceService extends APIService { } async getInstanceInfo(): Promise { - return this.get("/api/licenses/instances/", { headers: {} }) + return this.get("/api/instances/", { headers: {} }) .then((response) => response.data) .catch((error) => { throw error; @@ -18,7 +18,7 @@ export class InstanceService extends APIService { } async getInstanceAdmins(): Promise { - return this.get("/api/licenses/instances/admins/") + return this.get("/api/instances/admins/") .then((response) => response.data) .catch((error) => { throw error; @@ -26,7 +26,7 @@ export class InstanceService extends APIService { } async updateInstanceInfo(data: Partial): Promise { - return this.patch("/api/licenses/instances/", data) + return this.patch("/api/instances/", data) .then((response) => response?.data) .catch((error) => { throw error?.response?.data; @@ -34,7 +34,7 @@ export class InstanceService extends APIService { } async getInstanceConfigurations() { - return this.get("/api/licenses/instances/configurations/") + return this.get("/api/instances/configurations/") .then((response) => response.data) .catch((error) => { throw error; @@ -44,7 +44,7 @@ export class InstanceService extends APIService { async updateInstanceConfigurations( data: Partial ): Promise { - return this.patch("/api/licenses/instances/configurations/", data) + return this.patch("/api/instances/configurations/", data) .then((response) => response?.data) .catch((error) => { throw error?.response?.data;