Skip to content

Commit

Permalink
Rollback personio auth bandaid
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed Mar 20, 2024
1 parent f94cb8d commit 9a9aa27
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/apis/personio/PersonioApiController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ export async function initializePersonioApi(

let employeeData = await fetchWithPersonioAuth(url);

if (!employeeData.success) {
// Try with switched first and last name
const [lastName, firstName] = username.split(".");
const mailAddress = `${firstName}.${lastName}@${DIGITALSERVICE_MAIL_DOMAIN}`;
url.searchParams.set("email", mailAddress);

employeeData = await fetchWithPersonioAuth(url);
}

if (!employeeData.success) {
throw new Error("Personio employee not found");
}
Expand Down

0 comments on commit 9a9aa27

Please sign in to comment.