This issue is when the register endpoint in the REST-API creates a user, after the Trustee user is added to the database a relation between the Trustee and the Citizen is created. Currently as it is implemented in the REST-API a Trustee is added to all Citizens with the method AddTrusteeToCitizens and all Trustees are added to the one Citizen in this method AddCitizensToTrustee.
Both methods get called in the register endpoint under the \lstinline{AccountController}. To solve this issues one or two new methods should be created which adds the created Citizen to the created Trustee when they are created. These methods should be added to if-else statement in the register endpoint.
This issue is when the register endpoint in the REST-API creates a user, after the Trustee user is added to the database a relation between the Trustee and the Citizen is created. Currently as it is implemented in the REST-API a Trustee is added to all Citizens with the method AddTrusteeToCitizens and all Trustees are added to the one Citizen in this method AddCitizensToTrustee.
Both methods get called in the register endpoint under the \lstinline{AccountController}. To solve this issues one or two new methods should be created which adds the created Citizen to the created Trustee when they are created. These methods should be added to if-else statement in the register endpoint.