diff --git a/lib/services/network/request.dart b/lib/services/network/request.dart index dc23f9b..346dcb2 100644 --- a/lib/services/network/request.dart +++ b/lib/services/network/request.dart @@ -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 get result => _body['result'] ?? const {}; + Map get errors => _body['errors'] ?? const {}; String errorMessage = 'خطا! لطفا اتصال اینترنت خود را بررسی و مجددا تلاش نمایید.'; diff --git a/lib/services/network/request_helper.dart b/lib/services/network/request_helper.dart index c0d37fc..a14df9c 100644 --- a/lib/services/network/request_helper.dart +++ b/lib/services/network/request_helper.dart @@ -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 categories = const [],