claimOwnerShipApplication function
Implementation
Future<AppModel> claimOwnerShipApplication(String appId, String ownerID) async {
// first delete the app
AppModel? oldApp = await appRepository()!.get(appId);
if (oldApp != null) {
await appRepository()!.delete(oldApp);
}
// add the app
var application = AppModel(
documentID: appId,
ownerID: ownerID,
);
return await AbstractMainRepositorySingleton.singleton
.appRepository()!
.add(application);
}