dev: update the instance urls (#3329)

This commit is contained in:
Nikhil 2024-01-10 12:22:20 +05:30 committed by sriram veeraghanta
parent 0f99fb302b
commit 23e5306f6d
4 changed files with 13 additions and 13 deletions

View File

@ -10,32 +10,32 @@ from plane.license.api.views import (
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",
),

View File

@ -12,7 +12,7 @@ urlpatterns = [
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")),
]

View File

@ -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);

View File

@ -10,7 +10,7 @@ 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;
@ -18,7 +18,7 @@ export class InstanceService extends APIService {
}
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;
@ -26,7 +26,7 @@ export class InstanceService extends APIService {
}
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;
@ -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<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;