merge branches

This commit is contained in:
amirrezaghabeli
2025-08-18 08:28:18 +03:30
parent 0a54b613cd
commit 36f66bfca5
48 changed files with 2348 additions and 613 deletions
+3 -3
View File
@@ -22,7 +22,7 @@ class AuthService {
var data = jsonEncode({"password": password, "username": username});
final result = await _networkManager.makeRequest(
'/admin/v1/profile/login',
'/api/v1/profile/login',
method: 'POST',
(json) => LoginResponseModel.fromJson(json),
data: data,
@@ -31,14 +31,14 @@ class AuthService {
if (result is Ok<LoginResponseModel>) {
final prefs = await SharedPreferences.getInstance();
final token = result.value.data.accessToken;
await prefs.setString('bearer', token);
await prefs.setString('bearer', token!);
}
return result;
}
Future<Result<LogoutResponse>> logout() async {
final result = await _networkManager.makeRequest(
'/admin/v1/profile/logout',
'/api/v1/profile/logout',
method: 'DELETE',
(json) => LogoutResponse.fromJson(json),
);