Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove the dependence of npm package 'js-md5' #85

Merged
merged 1 commit into from
May 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"crypto": "1.0.1",
"eslint": "4.19.1",
"form-data": "^2.3.2",
"js-md5": "^0.7.3",
"json-bigint": "0.2.3",
"koa": "2.5.0",
"koa-redis-cache": "3.0.0",
Expand Down
3 changes: 2 additions & 1 deletion routes/tucaoqq/post.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const axios = require('axios');
const template = require('../../utils/template');
const config = require('../../config');
const md5 = require('js-md5');
const md5 = require('../../utils/md5');


module.exports = async (ctx) => {
const projectID = ctx.params.project;
Expand Down
5 changes: 5 additions & 0 deletions utils/md5.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const crypto = require('crypto');

module.exports = function md5(date) {
return crypto.createHash('md5').update(date).digest("hex");
}