Updates
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
type Param = {
|
||||
email: string;
|
||||
encryptionKey?: string;
|
||||
encryptionSalt?: string;
|
||||
};
|
||||
export type EncryptResetPasswordObject = {
|
||||
email: string;
|
||||
createdAt: number;
|
||||
};
|
||||
export default function encryptReserPasswordUrl({ email, encryptionKey, encryptionSalt, }: Param): void;
|
||||
export {};
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.default = encryptReserPasswordUrl;
|
||||
const ejson_1 = __importDefault(require("../../../../../utils/ejson"));
|
||||
const encrypt_1 = __importDefault(require("../../../../dsql/encrypt"));
|
||||
function encryptReserPasswordUrl({ email, encryptionKey, encryptionSalt, }) {
|
||||
const encryptObject = {
|
||||
email,
|
||||
createdAt: Date.now(),
|
||||
};
|
||||
const encryptStr = (0, encrypt_1.default)({
|
||||
data: ejson_1.default.stringify(encryptObject),
|
||||
encryptionKey,
|
||||
encryptionSalt,
|
||||
});
|
||||
const defaultUrlOrigin = `https://datasquirel.com`;
|
||||
let urlOrigin = process.env.DSQL_HOST || defaultUrlOrigin;
|
||||
const url = `${defaultUrlOrigin}`;
|
||||
}
|
||||
Reference in New Issue
Block a user