mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-24 05:17:24 +02:00
bugfix: download mod not reload installedMods list
This commit is contained in:
parent
3ee1842344
commit
f8d5a78c09
@ -169,6 +169,7 @@ func ModPortalInstallHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
resp.Data = mods.listInstalledMods()
|
||||
resp.Success = true
|
||||
|
||||
if err := json.NewEncoder(w).Encode(resp); err != nil {
|
||||
|
@ -85,6 +85,8 @@ class ModsContent extends React.Component {
|
||||
let filename = $checked_input.data("filename");
|
||||
let mod_name = $checked_input.data("modid");
|
||||
|
||||
let this_class = this;
|
||||
|
||||
$.ajax({
|
||||
method: "POST",
|
||||
url: "/api/mods/install",
|
||||
@ -97,8 +99,8 @@ class ModsContent extends React.Component {
|
||||
modName: mod_name
|
||||
},
|
||||
success: (data) => {
|
||||
this.setState({
|
||||
installedMods: data.data
|
||||
this_class.setState({
|
||||
installedMods: data.data.mods
|
||||
})
|
||||
|
||||
swal({
|
||||
|
Loading…
x
Reference in New Issue
Block a user