D1APP-22 new apis + type correction

This commit is contained in:
MohammadTaha Basiri 2022-01-08 14:17:40 +03:30
parent 2486aa94a9
commit 11e00d3f98
2 changed files with 12 additions and 4 deletions

View File

@ -8,8 +8,8 @@ class RequestService {
static set token(String value) => _token = value;
Map get result => _body['result'] ?? const {};
Map get errors => _body['errors'] ?? const {};
Map<String, dynamic> get result => _body['result'] ?? const {};
Map<String, dynamic> get errors => _body['errors'] ?? const {};
String errorMessage =
'خطا! لطفا اتصال اینترنت خود را بررسی و مجددا تلاش نمایید.';

View File

@ -1,9 +1,17 @@
class RequestHelper {
static const String _baseUrl = 'https://didvan-greatsam.fandogh.cloud';
static const String _baseUserUrl = _baseUrl + '/user';
static const String confirmUsername = _baseUrl + '/user/confirmUsername';
static const String login = _baseUrl + '/user/login';
static const String confirmUsername = _baseUserUrl + '/confirmUsername';
static const String login = _baseUserUrl + '/login';
static const String directs = _baseUserUrl + '/direct';
static const String userInfo = _baseUserUrl + '/info';
static const String updateUserProfile = _baseUserUrl + '/profile/photo';
static const String updateUsername = _baseUserUrl + '/setUsername';
static const String radarCategories = _baseUrl + '/category';
static String direct(int id) => _baseUserUrl + '/direct/$id';
static String getRadarOverviews({
required int page,
List<int> categories = const [],