mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
Encode uri URL
This commit is contained in:
parent
246d4ed538
commit
da399a7ec5
@ -35,7 +35,7 @@ export default class RestClient implements Client {
|
|||||||
deleteMapPermission(id: number, email: string): Promise<void> {
|
deleteMapPermission(id: number, email: string): Promise<void> {
|
||||||
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
||||||
axios
|
axios
|
||||||
.delete(`${this.baseUrl}/c/restful/maps/${id}/collabs?email=${email}`, {
|
.delete(`${this.baseUrl}/c/restful/maps/${id}/collabs?email=${encodeURIComponent(email)}`, {
|
||||||
headers: { 'Content-Type': 'text/plain' },
|
headers: { 'Content-Type': 'text/plain' },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@ -181,7 +181,7 @@ export default class RestClient implements Client {
|
|||||||
const handler = (success: (mapId: number) => void, reject: (error: ErrorInfo) => void) => {
|
const handler = (success: (mapId: number) => void, reject: (error: ErrorInfo) => void) => {
|
||||||
axios
|
axios
|
||||||
.post(
|
.post(
|
||||||
`${this.baseUrl}/c/restful/maps?title=${model.title}&description=${model.description ? model.description : ''
|
`${this.baseUrl}/c/restful/maps?title=${encodeURIComponent(model.title)}&description=${model.description ? model.description : ''
|
||||||
}`,
|
}`,
|
||||||
model.content,
|
model.content,
|
||||||
{ headers: { 'Content-Type': 'application/xml' } }
|
{ headers: { 'Content-Type': 'application/xml' } }
|
||||||
@ -426,7 +426,7 @@ export default class RestClient implements Client {
|
|||||||
resetPassword(email: string): Promise<void> {
|
resetPassword(email: string): Promise<void> {
|
||||||
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
const handler = (success: () => void, reject: (error: ErrorInfo) => void) => {
|
||||||
axios
|
axios
|
||||||
.put(`${this.baseUrl}/service/users/resetPassword?email=${email}`, null, {
|
.put(`${this.baseUrl}/service/users/resetPassword?email=${encodeURIComponent(email)}`, null, {
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user