refac, feat: API 호출 구조 재작성

- api.php에서 param path 강제
- api.php에서 GET param 허용
- SammoAPI 호출자를 axios에서 fetch 기반(ky)로 변경
- SammoAPI에서 단순 POST대신 REST에 따라 지정 가능하도록 재구성
- SammoAPI에서 NumVar, StrVar를 PathParam으로 변경하도록 변경
- API CallType들을 def/API로 분리 시작
  - 일부 API를 시험삼아 변경(login)
This commit is contained in:
2022-04-02 23:31:05 +09:00
parent 8fa3f3e6f7
commit 45a8a9d581
14 changed files with 282 additions and 172 deletions
+6 -1
View File
@@ -5,4 +5,9 @@ namespace sammo;
include "lib.php";
include "func.php";
APIHelper::launch(dirname(__FILE__), $_GET['path']??null);
$eParams = $_GET;
if(key_exists('path', $eParams)){
unset($eParams['path']);
}
APIHelper::launch(dirname(__FILE__), $_GET['path']??'', $eParams, true);