MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / assertOk

Function assertOk

wxapp/wps.js:263–268  ·  view source on GitHub ↗
(res, action)

Source from the content-addressed store, hash-verified

261}
262
263function assertOk(res, action) {
264 if (!res || res.result !== "ok") {
265 throw new Error(`${action}失败: ${res?.msg || res?.result || JSON.stringify(res)}`);
266 }
267 return res.data ?? res;
268}
269
270class Task {
271 constructor(raw) {

Callers 3

loginMethod · 0.70
userInfoMethod · 0.70
taskOutlineMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected