mirror of
https://github.com/DIYgod/DPlayer
synced 2024-11-22 10:02:59 +00:00
use new api based on DaoCloud; rm useless modules
This commit is contained in:
parent
6af21b1420
commit
2a873bc91a
@ -66,7 +66,7 @@
|
||||
},
|
||||
danmaku: {
|
||||
id: '9E2E3368B56CDBB4',
|
||||
api: 'https://dan.anotherhome.net/'
|
||||
api: 'http://dplayer.daoapp.io/'
|
||||
}
|
||||
});
|
||||
dp.init();
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user