changed endpoint

This commit is contained in:
hannathkadher
2024-12-10 10:49:43 +04:00
parent 2ac8128eff
commit 66eadd2567
7 changed files with 31 additions and 17 deletions

View File

@ -4,6 +4,7 @@ import 'package:syncrow_app/features/auth/model/user_model.dart';
import 'package:syncrow_app/features/devices/model/subspace_model.dart';
import 'package:syncrow_app/services/api/api_links_endpoints.dart';
import 'package:syncrow_app/services/api/http_service.dart';
import 'package:syncrow_app/utils/constants/temp_const.dart';
class SpacesAPI {
static final HTTPService _httpService = HTTPService();
@ -35,7 +36,8 @@ class SpacesAPI {
// Construct the API path
final path = ApiEndpoints.listSubspace
.replaceFirst('{communityUuid}', communityId)
.replaceFirst('{spaceUuid}', spaceId);
.replaceFirst('{spaceUuid}', spaceId)
.replaceAll('{projectUuid}', TempConst.projectId);
final response = await _httpService.get(
path: path,
@ -67,7 +69,8 @@ class SpacesAPI {
final response = await _httpService.get(
path: ApiEndpoints.invitationCode
.replaceAll('{unitUuid}', unitId)
.replaceAll('{communityUuid}', communityId),
.replaceAll('{communityUuid}', communityId)
.replaceAll('{projectUuid}', TempConst.projectId),
showServerMessage: false,
expectedResponseModel: (json) {
if (json != null && json['data'] != null) {