kwallet and nocodb

This commit is contained in:
2024-03-21 10:35:30 +01:00
parent 4f578e0bb0
commit 9737f6cdab
2 changed files with 34 additions and 18 deletions

View File

@@ -1,5 +1,6 @@
#!/usr/bin/env nodejsscript
/* jshint esversion: 11,-W097, -W040, module: true, node: true, expr: true, undef: true *//* global echo, $, pipe, s, fetch, cyclicLoop */
import { kwallet } from "./§kwallet.mjs";
const url_api= "https://nocodb.jaandrle.cz/api/v1/db/data/v1/Linky/Linky";
$.api()
.command("add-md")
@@ -9,7 +10,7 @@ $.api()
const res= await fetch(url_api, {
body: JSON.stringify({ Popis: title.slice(1), Url: url.slice(0, -1) }),
headers: { "xc-token": "Js7Qu0oT_wTmGJDFKlIZEBhwk87WF0L1wLmQO01F",
headers: { "xc-token": kwallet([ "readPassword", "Passwords", "nocodb-linky" ])[0].toString(),
"accept": "application/json", "Content-Type": "application/json"
},
method: "post"