gyh
This commit is contained in:
parent
c33241bfbd
commit
adda611985
1 changed files with 11 additions and 7 deletions
|
@ -216,14 +216,18 @@ function createSettingElement(key, [label, value, editable]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var res = await api("repos/migrate", _data);
|
var res = await api("repos/migrate", _data);
|
||||||
var resp = JSON.parse(res);
|
try {
|
||||||
|
var resp = JSON.parse(res);
|
||||||
|
|
||||||
if (resp.message) {
|
if (resp.message) {
|
||||||
if (resp.message == "The repository with the same name already exists.") {
|
if (resp.message == "The repository with the same name already exists.") {
|
||||||
window.open(`${config.instance}/mirrors/${repo}`);
|
window.open(`${config.instance}/mirrors/${repo}`);
|
||||||
} else alert(resp.message);
|
} else alert(resp.message);
|
||||||
} else {
|
} else {
|
||||||
window.open(resp.html_url);
|
window.open(resp.html_url);
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
alert(err);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue