MCPcopy Create free account
hub / github.com/6dylan6/jdm / addEnv

Function addEnv

function/sendNotify.js:2114–2132  ·  view source on GitHub ↗
(cookie, remarks)

Source from the content-addressed store, hash-verified

2112};
2113
2114async function addEnv(cookie, remarks){
2115 const token = await getToken();
2116 const body = await api({
2117 method: 'post',
2118 url: 'api/envs',
2119 params: { t: Date.now() },
2120 json: [{
2121 name: 'JD_COOKIE',
2122 value: cookie,
2123 remarks,
2124 }],
2125 headers: {
2126 Accept: 'application/json',
2127 authorization: `Bearer ${token}`,
2128 'Content-Type': 'application/json;charset=UTF-8',
2129 },
2130 }).json();
2131 return body;
2132}
2133
2134async function updateEnv(cookie, eid, remarks){
2135 const token = await getToken();

Callers

nothing calls this directly

Calls 2

nowMethod · 0.80
getTokenFunction · 0.70

Tested by

no test coverage detected