Commit c3c07e83 authored by Leon's avatar Leon

upload.

parent c62d8971
var httpfunc = require('topsin.httpfunc');
var REQ = httpfunc.argv().request;
var RES = httpfunc.argv().response;
var SinEror = require('topsin.error');
var result = new(require('topsin.responsedata'))();
var DB = require('topsin.database');
var DBNAME = REQ.pathCapture('DBNAME');
var Crypto = require('topsin.crypto');
var _ = require('lodash');
try {
var data = DB.query(DBNAME, function(q) {
q.insertRow({
table: "sys_user_conf",
data: {
user_id: 1,
path: 'dirty',
attr_data: {
a: 4.1234
}
}
});
if (q.lastError().isValid()) {
throw q.lastError().text();
}
});
RES.body(true);
} catch (err) {
result.setErrText(_.toString(err));
RES.body(result.toJson());
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment