import Api from '@/services/API';

/**
 * @typedef {AuthRequest}
 */

export default class Auth extends Api {

    /**
   * @type {String}
   */
    static base = '/api/password'


/**
   * @type {String}
   */
  static resource = ''

    /**
       * @param {String} resource
       * @param {Object} options
       * @param {Object} http
       */
    constructor(resource, options = {}, http = null) {
        super(Auth.normalize(Auth.base, resource), options, http);
            }

    /**
   * @return {this}
   */
    static build() {
        return new this(this.resource);
    }

    forgotPassword(username) {

        let data = {
            username:username,
        }

        return this.post('/forgot-password',data);
    }

    newPassword(data) {



        return this.post('/newPassword',data);
    }
}