Skip to content

Commit

Permalink
feat(admin, experimental): options 接口支持使用 . 区分服务和选项
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Nov 2, 2023
1 parent ec30762 commit 08f5da5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pages/api/admin/options/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public function get($req)
$data = [];
$ids = explode(',', (string) $req['id']);
foreach ($ids as $id) {
[$name, $option] = explode('-', $id);
$separator = false !== strpos($id, '.') ? '.' : '-';
[$name, $option] = explode($separator, $id);

if (!$this->wei->has($name)) {
return err('服务不存在');
Expand Down

0 comments on commit 08f5da5

Please sign in to comment.