mirror of
https://github.com/yuruotong1/autoMate.git
synced 2026-03-22 13:07:17 +08:00
更新代码运行
This commit is contained in:
@@ -33,14 +33,15 @@ export const Content = () => {
|
||||
))}
|
||||
</select>
|
||||
<Button onClick={async () => {
|
||||
revalidator.revalidate()
|
||||
const code_content = (await window.api.sql(`select * from contents where id = ${content.id}`, "findOne")) as ContentType
|
||||
console.log(code_content)
|
||||
const res = await fetch(localServerBaseUrl + "/execute", {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify({
|
||||
code: content.content
|
||||
code: code_content.content
|
||||
})
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
Reference in New Issue
Block a user