Skip to content

Commit

Permalink
be
Browse files Browse the repository at this point in the history
  • Loading branch information
getrebuild committed Dec 29, 2024
1 parent fd70925 commit e8214b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@
@RestController
public class RBStoreController extends BaseController {

@GetMapping("/admin/rbstore/load-index")
@GetMapping({"/admin/rbstore/load-index", "/setup/load-index"})
public JSONAware loadDataIndex(HttpServletRequest request) {
String type = getParameterNotNull(request, "type");
if (CommonsUtils.isExternalUrl(type)) {
return RespBody.error();
}
if (CommonsUtils.isExternalUrl(type)) return RespBody.error();

JSON index = null;
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.alibaba.fastjson.JSONObject;
import com.rebuild.api.RespBody;
import com.rebuild.core.Application;
import com.rebuild.core.RebuildException;
import com.rebuild.core.DefinedException;
import com.rebuild.core.support.License;
import com.rebuild.core.support.i18n.Language;
import com.rebuild.core.support.setup.InstallState;
Expand Down Expand Up @@ -53,7 +53,7 @@ public class InstallController extends BaseController implements InstallState {
@Override
public boolean checkInstalled() {
if (InstallState.super.checkInstalled() && Application.isReady()) {
throw new RebuildException("NOT ALLOWED");
throw new DefinedException("NOT ALLOWED");
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
package com.rebuild.web.admin.setup;

import com.rebuild.api.RespBody;
import com.rebuild.core.DefinedException;
import com.rebuild.core.RebuildException;
import com.rebuild.core.rbstore.RbSystemImporter;
import com.rebuild.core.support.setup.InstallState;
Expand Down Expand Up @@ -35,8 +36,8 @@ public class RbSystemController extends BaseController implements InstallState {
public ModelAndView index(HttpServletRequest request) throws IOException {
try {
RbAssert.isSuperAdmin(getRequestUser(request));
} catch (Exception error404) {
throw new RebuildException("NOT ALLOWED");
} catch (Exception error403) {
throw new DefinedException("NOT ALLOWED");
}
return createModelAndView("/admin/setup/rbsystem");
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/web/assets/js/admin/setup-rbsystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class Setup extends React.Component {
}

$(document).ready(() => {
$.get('/admin/rbstore/load-index?type=rbsystems', (res) => {
$.get('/setup/load-index?type=rbsystems', (res) => {
if ((res.data || []).length > 0) {
renderRbcomp(<Setup data={res.data} />, $('.card-body'))
} else {
Expand Down

0 comments on commit e8214b0

Please sign in to comment.