for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import ApiService from '../api.service';
export default class AppUrlChangeService extends ApiService {
constructor(httpClient, loginService) {
super(httpClient, loginService, null, 'application/json');
this.name = 'appUrlChangeService';
}
/**
* @returns {Promise<Array<{key: string, description: string}>>}
*/
fetchResolverStrategies() {
return this.httpClient.get(
'app-system/app-url-change/strategies',
{
headers: this.getBasicHeaders()
).then(({ data }) => {
return Object.entries(data).map(([key, description]) => {
return { name: key, description };
});
* @param {{name: string}} strategy
* @returns {*}
resolveUrlChange({ name }) {
return this.httpClient
.post(
'app-system/app-url-change/resolve',
{ strategy: name },
);
* @returns {Promise<{newUrl: string, oldUrl: string} | null>}
getUrlDiff() {
'app-system/app-url-change/url-difference',
).then((resp) => {
if (resp.status === 204) {
return null;
return resp.data;