adapt getDefaultTagCar unit test
MODIFY
test/api/UserTest.ts
test/api/UserTest.ts
@@ -273,9 +273,9 @@ describe('User', function() {
expect(response.status).to.equal(StatusCodes.CREATED);
testData.createdTags.push(testData.newTag);
// Retrieve it
- response = await testData.userService.userApi.getDefaultTagCar(testData.newUser.id);
+ response = await testData.userService.userApi.getDefaultTagCar(testData.newUser.id,testData.siteContext.getSite().id);
expect(response.status).to.be.eq(StatusCodes.OK);
- expect(response.data.tag.id).to.be.eq(testData.newTag.id);
+ expect(response.data.tag.visualID).to.be.eq(testData.newTag.visualID);
expect(response.data.car).to.be.undefined;
expect(response.data.errorCodes).to.be.empty;
});

MODIFY
test/api/client/UserApi.ts
test/api/client/UserApi.ts
@@ -80,8 +80,8 @@ export default class UserApi extends CrudApi {
return await super.read({}, url);
}
- public async getDefaultTagCar(userID: string) {
- const url = this.buildRestEndpointUrl(ServerRoute.REST_USER_DEFAULT_TAG_CAR, { id: userID });
- return await super.read({}, url);
+ public async getDefaultTagCar(userID: string, siteID: string) {
+ const url = this.buildRestEndpointUrl(ServerRoute.REST_USER_DEFAULT_TAG_CAR, { });
+ return await super.read({ UserID: userID, SiteID: siteID }, url);
}
}

adapt getDefaultTagCar unit test