Добавил запрос на создание препода от кафедры
This commit is contained in:
@@ -109,15 +109,23 @@ function invalidateCache(url) {
|
||||
'/api/specialties',
|
||||
'/api/education-forms',
|
||||
'/api/users',
|
||||
'/api/teacher-requests',
|
||||
'/api/department/teacher-requests',
|
||||
'/api/department/teachers',
|
||||
'/api/equipments',
|
||||
'/api/classrooms'
|
||||
];
|
||||
for (const prefix of cacheKeysToClear) {
|
||||
if (url.includes(prefix)) {
|
||||
for (const cacheKey of cache.keys()) {
|
||||
if (cacheKey.includes(prefix)) {
|
||||
cache.delete(cacheKey);
|
||||
}
|
||||
const affectedPrefixes = new Set(cacheKeysToClear.filter(prefix => url.includes(prefix)));
|
||||
if (url.includes('/api/teacher-requests')) {
|
||||
affectedPrefixes.add('/api/users');
|
||||
}
|
||||
if (url.includes('/api/department/teachers')) {
|
||||
affectedPrefixes.add('/api/users/teachers');
|
||||
}
|
||||
for (const prefix of affectedPrefixes) {
|
||||
for (const cacheKey of cache.keys()) {
|
||||
if (cacheKey.includes(prefix)) {
|
||||
cache.delete(cacheKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user