mirror of
https://github.com/donpat1to/Schichtenplaner.git
synced 2025-12-01 06:55:45 +01:00
updated every file for database changes; starting scheduling debugging
This commit is contained in:
@@ -130,6 +130,22 @@ export class EmployeeService {
|
||||
throw new Error(error.error || 'Failed to change password');
|
||||
}
|
||||
}
|
||||
|
||||
async updateLastLogin(employeeId: string): Promise<void> {
|
||||
try {
|
||||
const response = await fetch(`${API_BASE_URL}/employees/${employeeId}/last-login`, {
|
||||
method: 'PATCH',
|
||||
headers: getAuthHeaders(),
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new Error('Failed to update last login');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error updating last login:', error);
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const employeeService = new EmployeeService();
|
||||
Reference in New Issue
Block a user