This commit is contained in:
Rizky 2024-08-27 06:41:57 +07:00
parent 31f8a8a856
commit 2e3e46d687
2 changed files with 8 additions and 6 deletions

View File

@ -38,9 +38,15 @@ export const EdApiDB = ({
<AutoHeightTextarea
value={local.url}
className="text-[13px] border p-2 mb-2 "
onChange={(e) => {
onChange={async (e) => {
local.url = e.currentTarget.value.replace(/\s/, "");
db.url = local.url;
await api._deploy({
type: "db-update",
id_site: p.site.id,
url: db.url,
});
local.render();
}}
onBlur={async () => {

View File

@ -41,15 +41,11 @@ export const EdApiTab: FC<{
let url = target ? target.api_url : api_url;
const res = await checkAPI(url, id_site);
local.api_url = url;
local.status = "online";
if (typeof res === "object") {
// await apiRef[apiUrl(p)]._deploy({
// type: "db-update",
// id_site: p.site.id,
// url: local.db.url,
// });
local.db = res.db;
local.domains = res.domains;