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

Function assertOk

wxapp/airui.js:118–123  ·  view source on GitHub ↗
(res, action)

Source from the content-addressed store, hash-verified

116}
117
118function assertOk(res, action) {
119 if (!res || Number(res.code) !== 1) {
120 throw new Error(`${action}失败: ${res?.description || res?.msg || JSON.stringify(res)}`);
121 }
122 return res.result;
123}
124
125class Task {
126 constructor(raw) {

Callers 4

loginMethod · 0.70
getUserInfoMethod · 0.70
getSignInfoMethod · 0.70
submitSignMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected