MCPcopy Index your code
hub / github.com/thinkjs/thinkjs / success

Function success

lib/extend/context.js:103–112  ·  view source on GitHub ↗

* send success data

(data = '', message = '')

Source from the content-addressed store, hash-verified

101 * send success data
102 */
103 success(data = '', message = '') {
104 const obj = {
105 [this.config('errnoField')]: 0,
106 [this.config('errmsgField')]: message,
107 data
108 };
109 this.type = this.config('jsonContentType');
110 this.body = obj;
111 return false;
112 },
113 /**
114 * send fail data
115 */

Callers

nothing calls this directly

Calls 1

configMethod · 0.80

Tested by

no test coverage detected