get user info and access management page

This commit is contained in:
mohammad
2024-08-08 16:54:02 +03:00
parent ab0551b2ce
commit 1d226742e6
13 changed files with 385 additions and 115 deletions

View File

@ -0,0 +1,18 @@
import 'package:syncrow_web/pages/auth/model/user_model.dart';
import 'package:syncrow_web/services/api/http_service.dart';
import 'package:syncrow_web/utils/constants/api_const.dart';
class HomeApi{
Future fetchUserInfo(userId) async {
final response = await HTTPService().get(
path: ApiEndpoints.getUser.replaceAll('{userUuid}', userId!),
showServerMessage: true,
expectedResponseModel: (json) {
print('user=$json');
return UserModel.fromJson(json);
}
);
return response;
}
}