Skip to content

Commit

Permalink
dev: update the instance urls (makeplane#3329)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablohashescobar committed Jan 10, 2024
1 parent 8b884ab commit 57594aa
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
12 changes: 6 additions & 6 deletions apiserver/plane/license/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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/<uuid:pk>/",
"admins/<uuid:pk>/",
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",
),
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")),
]
Expand Down
2 changes: 1 addition & 1 deletion web/services/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export class AuthService extends APIService {
}

async instanceAdminSignIn(data: IPasswordSignInData): Promise<ILoginTokenResponse> {
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);
Expand Down
10 changes: 5 additions & 5 deletions web/services/instance.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@ export class InstanceService extends APIService {
}

async getInstanceInfo(): Promise<IInstance> {
return this.get("/api/licenses/instances/", { headers: {} })
return this.get("/api/instances/", { headers: {} })
.then((response) => response.data)
.catch((error) => {
throw error;
});
}

async getInstanceAdmins(): Promise<IInstanceAdmin[]> {
return this.get("/api/licenses/instances/admins/")
return this.get("/api/instances/admins/")
.then((response) => response.data)
.catch((error) => {
throw error;
});
}

async updateInstanceInfo(data: Partial<IInstance>): Promise<IInstance> {
return this.patch("/api/licenses/instances/", data)
return this.patch("/api/instances/", data)
.then((response) => response?.data)
.catch((error) => {
throw error?.response?.data;
});
}

async getInstanceConfigurations() {
return this.get("/api/licenses/instances/configurations/")
return this.get("/api/instances/configurations/")
.then((response) => response.data)
.catch((error) => {
throw error;
Expand All @@ -44,7 +44,7 @@ export class InstanceService extends APIService {
async updateInstanceConfigurations(
data: Partial<IFormattedInstanceConfiguration>
): Promise<IInstanceConfiguration[]> {
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;
Expand Down

0 comments on commit 57594aa

Please sign in to comment.