feat: api.php 호출에서 path를 경로로 지정하는 방식 추가
This commit is contained in:
+1
-1
@@ -5,4 +5,4 @@ namespace sammo;
|
||||
include "lib.php";
|
||||
include "func.php";
|
||||
|
||||
APIHelper::launch(dirname(__FILE__));
|
||||
APIHelper::launch(dirname(__FILE__), $_GET['path']??null);
|
||||
@@ -16,13 +16,10 @@ export async function callSammoAPI<ResultType extends ValidResponse, ErrorType e
|
||||
}
|
||||
|
||||
const response = await axios({
|
||||
url: "api.php",
|
||||
url: `api.php?path=${path}`,
|
||||
method: "post",
|
||||
responseType: "json",
|
||||
data: {
|
||||
path,
|
||||
args,
|
||||
},
|
||||
data: args
|
||||
});
|
||||
const result: ErrorType | ResultType = response.data;
|
||||
if (!result.result) {
|
||||
|
||||
Reference in New Issue
Block a user