Commit f84c6a1b authored by huanglu's avatar huanglu

fix: update

parent 0e854772
...@@ -2,7 +2,7 @@ import { Service } from 'egg'; ...@@ -2,7 +2,7 @@ import { Service } from 'egg';
export default class Account extends Service { export default class Account extends Service {
public async login() { public async login() {
const { ctx } = this; const { ctx, logger } = this;
// const sourceUrl = config.source_url; // const sourceUrl = config.source_url;
// const result = await ctx.helper.http().get('https://registry.npm.taobao.org/egg/latest'); // const result = await ctx.helper.http().get('https://registry.npm.taobao.org/egg/latest');
console.log('sfsfs; ', ctx.token); console.log('sfsfs; ', ctx.token);
...@@ -10,6 +10,7 @@ export default class Account extends Service { ...@@ -10,6 +10,7 @@ export default class Account extends Service {
const token = ctx.token; const token = ctx.token;
const hashName = await ctx.genHash(pwd); const hashName = await ctx.genHash(pwd);
// const origin = await ctx.compare(pwd, hashName); // const origin = await ctx.compare(pwd, hashName);
logger.info('login: ', { pwd, name, age });
const user = await ctx.model.User.create({ const user = await ctx.model.User.create({
name, name,
pwd: hashName, pwd: hashName,
......
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