summaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index a53dc34..8c089f5 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -66,4 +66,24 @@ site.init = function(){
}
})
})
+
+ /* shaderblaster / asciiblaster apis */
+ app.post("/cgi-bin/im/shader/upload", multer_upload.single('qqfile'), function(req, res){
+ upload.put("shader", req.file, {
+
+ unacceptable: function(err){
+ res.json({ error: err })
+ },
+ success: function(url){
+ db.createShaderImage({
+ username: req.body.username,
+ tag: req.body.tag,
+ url,
+ }).then(function(image){
+ res.json(image)
+ })
+ }
+ })
+ })
+
}