(organizationId: string)
| 185 | } |
| 186 | |
| 187 | export async function syncProjects(organizationId: string) { |
| 188 | // Local-only organizations have no team projects to fetch, so bail out before the request. |
| 189 | if (models.organization.isLocalOrganizationId(organizationId)) { |
| 190 | return; |
| 191 | } |
| 192 | const user = await userSessionService.get(); |
| 193 | const teamProjects = await getAllTeamProjects(organizationId); |
| 194 | // ensure we don't sync projects in the wrong place |
| 195 | if (Array.isArray(teamProjects) && user.id) { |
| 196 | await syncTeamProjects({ teamProjects, organizationId }); |
| 197 | } |
| 198 | } |
no test coverage detected