abstract class Api {
public validateRequest (validationModel : this, response : AxiosResponse) : boolean {
/* ВОТ ЗДЕСЬ СВЕРЯЮТСЯ ПАРАМЕТРЫ КОНСТРУКТОРА validationModel и response.data*/
return true;
}
import User from "./EntityClasses/AllEntities/User";
class UserApi extends Api {
public async getAuthUser() : Promise<User | null> {
let response = await this.sendRequest('get', 'currentUser');
this.validateRequest(User, response);
/* Пока просто делаю return null*/
return null;
}
CMD mysqld \
&& mysql -ppassword -e "CREATE DATABASE mydb;GRANT ALL PRIVILEGES on mydb.* TO 'root'@'0.0.0.0' WITH GRANT OPTION;ALTER USER 'root'@'localhost' IDENTIFIED BY '${MYSQL_ROOT_PASSWORD}';FLUSH PRIVILEGES;"