mirror of
https://github.com/PretendoNetwork/account.git
synced 2024-05-17 04:11:03 -04:00
removed deprecated url.format
This commit is contained in:
parent
49bec84289
commit
8528864799
|
@ -18,7 +18,7 @@ prompt.get(properties, (error, { username, email, password }) => {
|
|||
const date = new Date().toISOString();
|
||||
// Sample Mii data
|
||||
const miiData = 'AwAAQOlVognnx0GC2X0LLQOzuI0n2QAAAUBiAGUAbABsAGEAAABFAAAAAAAAAEBAEgCBAQRoQxggNEYUgRIXaA0AACkDUkhQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP6G';
|
||||
|
||||
|
||||
const document = {
|
||||
pid: 1,
|
||||
creation_date: date.split('.')[0],
|
||||
|
|
11
src/util.js
11
src/util.js
|
@ -1,7 +1,6 @@
|
|||
const crypto = require('crypto');
|
||||
const NodeRSA = require('node-rsa');
|
||||
const fs = require('fs-extra');
|
||||
const url = require('url');
|
||||
|
||||
function nintendoPasswordHash(password, pid) {
|
||||
const pidBuffer = Buffer.alloc(4);
|
||||
|
@ -161,11 +160,11 @@ function unpackToken(token) {
|
|||
}
|
||||
|
||||
function fullUrl(request) {
|
||||
return url.format({
|
||||
protocol: request.protocol,
|
||||
host: request.get('host'),
|
||||
pathname: request.originalUrl
|
||||
});
|
||||
const protocol = request.get('protocol');
|
||||
const host = request.get('host');
|
||||
const path = request.get('originalUrl');
|
||||
|
||||
return `${protocol}://${host}${path}`;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
|
Loading…
Reference in a new issue