use new api based on DaoCloud; rm useless modules

This commit is contained in:
DIYgod 2016-05-16 19:24:33 +08:00
parent 6af21b1420
commit 2a873bc91a
No known key found for this signature in database
GPG Key ID: F8797DD1088C6506
2 changed files with 1 additions and 6 deletions

View File

@ -66,7 +66,7 @@
},
danmaku: {
id: '9E2E3368B56CDBB4',
api: 'https://dan.anotherhome.net/'
api: 'http://dplayer.daoapp.io/'
}
});
dp.init();

View File

@ -1,13 +1,9 @@
var http = require('http');
var url = require('url');
var util = require('util');
var querystring = require('querystring');
var mongoose = require('mongoose');
var mongodbUrl = 'mongodb://' + process.env.MONGODB_USERNAME + ':' + process.env.MONGODB_PASSWORD + '@' + process.env.MONGODB_PORT_27017_TCP_ADDR + ':' + process.env.MONGODB_PORT_27017_TCP_PORT + '/' + process.env.MONGODB_INSTANCE_NAME;
var express = require('express');
var app = express();
var danmakuSchema = new mongoose.Schema({
player: String,
author: String,
@ -69,7 +65,6 @@ app.post('/', function (req, res) {
} catch (err) {
jsonStr = null;
}
// jsonStr ? res.send({"status":"success", "name": jsonStr.test}) : res.send({"status":"error"});
var dan = new danmaku({player: jsonStr.player, author: jsonStr.author, time: jsonStr.time, text: jsonStr.text, color: jsonStr.color, type: jsonStr.type});
dan.save(function (err, d) {