Home Reference Source
public class | source

HackerController

Method Summary

Public Methods
public

async create(emailAddress: string, password: string): Promise<string>

Create a new hacker, return hacker ID if successful.

public

async createToken(emailAddress: string, password: string, expireAfter: number): Promise<string>

Create a new hacker token.

public

async resetPassword(emailAddress: string, code: string, newPassword: string): Promise<string>

Reset hacker's password using reset code.

public

async sendPasswordResetEmail(emailAddress: string): Promise<string>

Send password reset email to hacker.

public

async update(id: string, hacker: UpdateHackerInput): Promise<string>

Update an existing hacker.

Public Methods

public async create(emailAddress: string, password: string): Promise<string> source

Create a new hacker, return hacker ID if successful.

Params:

NameTypeAttributeDescription
emailAddress string
password string

Return:

Promise<string>

public async createToken(emailAddress: string, password: string, expireAfter: number): Promise<string> source

Create a new hacker token.

Params:

NameTypeAttributeDescription
emailAddress string
password string
expireAfter number
  • optional
  • default: 86400

Return:

Promise<string>

public async resetPassword(emailAddress: string, code: string, newPassword: string): Promise<string> source

Reset hacker's password using reset code.

Params:

NameTypeAttributeDescription
emailAddress string
code string
newPassword string

Return:

Promise<string>

public async sendPasswordResetEmail(emailAddress: string): Promise<string> source

Send password reset email to hacker.

Params:

NameTypeAttributeDescription
emailAddress string

Return:

Promise<string>

public async update(id: string, hacker: UpdateHackerInput): Promise<string> source

Update an existing hacker.

Params:

NameTypeAttributeDescription
id string
hacker UpdateHackerInput

Return:

Promise<string>