feat(auth): create extended api config placeholder
This commit is contained in:
19
src/features/auth/api/config/authApi/authApi.ts
Normal file
19
src/features/auth/api/config/authApi/authApi.ts
Normal file
@@ -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;
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
1
src/features/auth/api/config/index.ts
Normal file
1
src/features/auth/api/config/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export * from "./authApi/authApi";
|
||||
Reference in New Issue
Block a user