From a36922e1c74884c317e48fbbca6929be46e408e3 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Tue, 17 Mar 2026 09:59:37 +0300 Subject: [PATCH] feat(auth): create extended api config placeholder --- .../auth/api/config/authApi/authApi.ts | 19 +++++++++++++++++++ src/features/auth/api/config/index.ts | 1 + 2 files changed, 20 insertions(+) create mode 100644 src/features/auth/api/config/authApi/authApi.ts create mode 100644 src/features/auth/api/config/index.ts diff --git a/src/features/auth/api/config/authApi/authApi.ts b/src/features/auth/api/config/authApi/authApi.ts new file mode 100644 index 0000000..d22eb9c --- /dev/null +++ b/src/features/auth/api/config/authApi/authApi.ts @@ -0,0 +1,19 @@ +import { api as baseApi } from "shared/config"; + +// Extend base API with authentication hooks +export const api = baseApi.extend({ + hooks: { + beforeRequest: [ + (request) => { + // Add authentication token to request headers + return request; + }, + ], + afterResponse: [ + async (request, options, response) => { + // Refresh token logic + return response; + }, + ], + }, +}); diff --git a/src/features/auth/api/config/index.ts b/src/features/auth/api/config/index.ts new file mode 100644 index 0000000..08b45d6 --- /dev/null +++ b/src/features/auth/api/config/index.ts @@ -0,0 +1 @@ +export * from "./authApi/authApi";