1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-09 15:35:25 +02:00

rm: user model and controller removed

This commit is contained in:
Umang G. Patel 2022-04-23 10:43:42 +05:30
parent 1fb4cf3106
commit 582635b4c7
2 changed files with 0 additions and 61 deletions

View file

@ -1,20 +0,0 @@
import User from '../models/user';
/**
* @class Users
* @classdesc Users controller
*/
class Users {
/**
* Find and return user model.
*
* @returns {Promise<User>}
*/
public static async get(): Promise<User> {
const userData: User = await User.get();
return userData;
}
}
export default Users;

View file

@ -1,41 +0,0 @@
import * as dotenv from 'dotenv';
dotenv.config();
export interface UserData {
password?: string;
}
/**
* @class User
* @class User model
*
* @property {string} passHash - hashed password
*/
class User {
public password?: string;
/**
* @class
*
* @param {UserData} userData - user data for construct new object
*/
constructor(userData: UserData) {
this.password = userData.password;
}
/**
* Find and return model of user.
* User is only one.
*
* @returns {Promise<User>}
*/
public static async get(): Promise<User> {
const userData: UserData = {
password: process.env.PASSWORD,
};
return new User(userData);
}
}
export default User;