mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 07:36:41 +00:00
Changes
Co-authored-by: domfelipe <53182096+domfelipe@users.noreply.github.com>
This commit is contained in:
parent
74f7a69991
commit
d8c7338c76
3 changed files with 5 additions and 3 deletions
|
|
@ -16,8 +16,9 @@ function jsonResponse(body: unknown, status = 200): Response {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deno-lint-ignore no-explicit-any
|
||||||
async function getDecryptedSecret(
|
async function getDecryptedSecret(
|
||||||
admin: ReturnType<typeof createClient>,
|
admin: any,
|
||||||
secretId: string,
|
secretId: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
const { data, error } = await admin
|
const { data, error } = await admin
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ function firstName(fullName: string | null | undefined): string {
|
||||||
return parts[0] || "Mika";
|
return parts[0] || "Mika";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// deno-lint-ignore no-explicit-any
|
||||||
async function getDecryptedSecret(
|
async function getDecryptedSecret(
|
||||||
admin: ReturnType<typeof createClient>,
|
admin: any,
|
||||||
secretId: string,
|
secretId: string,
|
||||||
): Promise<string | null> {
|
): Promise<string | null> {
|
||||||
const { data, error } = await admin
|
const { data, error } = await admin
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ Deno.serve(async (req) => {
|
||||||
|
|
||||||
// 5) Se já houver um vault_id antigo, remove (reconexão)
|
// 5) Se já houver um vault_id antigo, remove (reconexão)
|
||||||
if (agent.telegram_bot_token_vault_id) {
|
if (agent.telegram_bot_token_vault_id) {
|
||||||
await admin.rpc("exec_sql_void", {}).catch(() => {});
|
try { await admin.rpc("exec_sql_void", {} as never); } catch { /* ignore */ }
|
||||||
// tenta remover diretamente; ignora falha
|
// tenta remover diretamente; ignora falha
|
||||||
const { error: delErr } = await admin
|
const { error: delErr } = await admin
|
||||||
.from("vault.secrets" as unknown as never)
|
.from("vault.secrets" as unknown as never)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue