feat: upload muestra advertencias de config de datos
This commit is contained in:
1 parent
d167c0404e
commit
4a23ca63fe
1 file changed
+4
-1
@@ -61,9 +61,12 @@ export default function UploadPage() {
|
|||||||
});
|
});
|
||||||
const data = await res.json();
|
const data = await res.json();
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
|
const warns: string[] = Array.isArray(data.dbCheck?.warnings)
|
||||||
|
? data.dbCheck.warnings.slice(0, 4)
|
||||||
|
: [];
|
||||||
setResult({
|
setResult({
|
||||||
ok: true,
|
ok: true,
|
||||||
message: `Módulo "${payload.name}" registrado. Deploy: ${data.webhook ? "webhook creado" : "sin webhook"}${data.deployLog ? " · " + data.deployLog.slice(0, 80) : ""}`,
|
message: `Módulo "${payload.name}" registrado. Deploy: ${data.webhook ? "webhook creado" : "sin webhook"}${data.deployLog ? " · " + data.deployLog.slice(0, 80) : ""}${warns.length ? " · DB: " + warns.join(" | ").slice(0, 200) : ""}`,
|
||||||
});
|
});
|
||||||
setForm({ name: "", repoUrl: "", branch: "main", port: "", subdomain: "", category: "otras-apps", kind: "frontend", visible: true, targetPort: "", context: "" });
|
setForm({ name: "", repoUrl: "", branch: "main", port: "", subdomain: "", category: "otras-apps", kind: "frontend", visible: true, targetPort: "", context: "" });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in new issue
Block a user