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

Method assertOk

wxapp/skyworth.js:156–159  ·  view source on GitHub ↗
(data, name)

Source from the content-addressed store, hash-verified

154 }
155
156 assertOk(data, name) {
157 if (Number(data?.code) !== 0) throw new Error(`${name}失败: ${short(data)}`);
158 return data.data;
159 }
160
161 async login() {
162 if (this.token) {

Callers 4

loginMethod · 0.95
queryUserMethod · 0.95
queryTasksMethod · 0.95
completeTaskMethod · 0.95

Calls 1

shortFunction · 0.70

Tested by

no test coverage detected