UNPKG

@opengis/fastify-table

Version:

core-plugins

17 lines (16 loc) 516 B
import setToken from "../../plugins/crud/funcs/setToken.js"; export default function tokenFunc(params) { const { data, hash } = params; if (!data?.root?.user?.uid && !hash.uid) return "-"; if (!hash || typeof hash !== "object") return "-"; // const id = hash?.edit ? hash?.id : data?.root?.id; // console.log(hash) const [token] = setToken({ ids: [JSON.stringify(hash)], uid: data?.root?.user?.uid || hash.uid, array: true, }); return token; }