forked from github/plane
dev: update the instance urls (#3329)
This commit is contained in:
parent
0f99fb302b
commit
23e5306f6d
@ -10,32 +10,32 @@ from plane.license.api.views import (
|
|||||||
|
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path(
|
path(
|
||||||
"instances/",
|
"",
|
||||||
InstanceEndpoint.as_view(),
|
InstanceEndpoint.as_view(),
|
||||||
name="instance",
|
name="instance",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"instances/admins/",
|
"admins/",
|
||||||
InstanceAdminEndpoint.as_view(),
|
InstanceAdminEndpoint.as_view(),
|
||||||
name="instance-admins",
|
name="instance-admins",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"instances/admins/<uuid:pk>/",
|
"admins/<uuid:pk>/",
|
||||||
InstanceAdminEndpoint.as_view(),
|
InstanceAdminEndpoint.as_view(),
|
||||||
name="instance-admins",
|
name="instance-admins",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"instances/configurations/",
|
"configurations/",
|
||||||
InstanceConfigurationEndpoint.as_view(),
|
InstanceConfigurationEndpoint.as_view(),
|
||||||
name="instance-configuration",
|
name="instance-configuration",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"instances/admins/sign-in/",
|
"admins/sign-in/",
|
||||||
InstanceAdminSignInEndpoint.as_view(),
|
InstanceAdminSignInEndpoint.as_view(),
|
||||||
name="instance-admin-sign-in",
|
name="instance-admin-sign-in",
|
||||||
),
|
),
|
||||||
path(
|
path(
|
||||||
"instances/admins/sign-up-screen-visited/",
|
"admins/sign-up-screen-visited/",
|
||||||
SignUpScreenVisitedEndpoint.as_view(),
|
SignUpScreenVisitedEndpoint.as_view(),
|
||||||
name="instance-sign-up",
|
name="instance-sign-up",
|
||||||
),
|
),
|
||||||
|
@ -12,7 +12,7 @@ urlpatterns = [
|
|||||||
path("", TemplateView.as_view(template_name="index.html")),
|
path("", TemplateView.as_view(template_name="index.html")),
|
||||||
path("api/", include("plane.app.urls")),
|
path("api/", include("plane.app.urls")),
|
||||||
path("api/public/", include("plane.space.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("api/v1/", include("plane.api.urls")),
|
||||||
path("", include("plane.web.urls")),
|
path("", include("plane.web.urls")),
|
||||||
]
|
]
|
||||||
|
@ -119,7 +119,7 @@ export class AuthService extends APIService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async instanceAdminSignIn(data: IPasswordSignInData): Promise<ILoginTokenResponse> {
|
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) => {
|
.then((response) => {
|
||||||
if (response?.status === 200) {
|
if (response?.status === 200) {
|
||||||
this.setAccessToken(response?.data?.access_token);
|
this.setAccessToken(response?.data?.access_token);
|
||||||
|
@ -10,7 +10,7 @@ export class InstanceService extends APIService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getInstanceInfo(): Promise<IInstance> {
|
async getInstanceInfo(): Promise<IInstance> {
|
||||||
return this.get("/api/licenses/instances/", { headers: {} })
|
return this.get("/api/instances/", { headers: {} })
|
||||||
.then((response) => response.data)
|
.then((response) => response.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error;
|
throw error;
|
||||||
@ -18,7 +18,7 @@ export class InstanceService extends APIService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getInstanceAdmins(): Promise<IInstanceAdmin[]> {
|
async getInstanceAdmins(): Promise<IInstanceAdmin[]> {
|
||||||
return this.get("/api/licenses/instances/admins/")
|
return this.get("/api/instances/admins/")
|
||||||
.then((response) => response.data)
|
.then((response) => response.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error;
|
throw error;
|
||||||
@ -26,7 +26,7 @@ export class InstanceService extends APIService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async updateInstanceInfo(data: Partial<IInstance>): Promise<IInstance> {
|
async updateInstanceInfo(data: Partial<IInstance>): Promise<IInstance> {
|
||||||
return this.patch("/api/licenses/instances/", data)
|
return this.patch("/api/instances/", data)
|
||||||
.then((response) => response?.data)
|
.then((response) => response?.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error?.response?.data;
|
throw error?.response?.data;
|
||||||
@ -34,7 +34,7 @@ export class InstanceService extends APIService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getInstanceConfigurations() {
|
async getInstanceConfigurations() {
|
||||||
return this.get("/api/licenses/instances/configurations/")
|
return this.get("/api/instances/configurations/")
|
||||||
.then((response) => response.data)
|
.then((response) => response.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error;
|
throw error;
|
||||||
@ -44,7 +44,7 @@ export class InstanceService extends APIService {
|
|||||||
async updateInstanceConfigurations(
|
async updateInstanceConfigurations(
|
||||||
data: Partial<IFormattedInstanceConfiguration>
|
data: Partial<IFormattedInstanceConfiguration>
|
||||||
): Promise<IInstanceConfiguration[]> {
|
): Promise<IInstanceConfiguration[]> {
|
||||||
return this.patch("/api/licenses/instances/configurations/", data)
|
return this.patch("/api/instances/configurations/", data)
|
||||||
.then((response) => response?.data)
|
.then((response) => response?.data)
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
throw error?.response?.data;
|
throw error?.response?.data;
|
||||||
|
Loading…
Reference in New Issue
Block a user