mirror of
https://github.com/grafana/grafana.git
synced 2025-01-28 17:24:59 -06:00
7111c52e4c
* App events: Add info notification type * Revert state * Use info alert * Nav: Enable saving items * Use local state * Use RTK query * Revert go.work * Revert * User-specific queries * Add memo * Fix base URL * Switch to ids * Fix memo * Add codeowners * Generate API * Separate user prefs API * Remove tag * Update export * Use feature toggle
20 lines
543 B
TypeScript
20 lines
543 B
TypeScript
import { generatedAPI } from './user/endpoints.gen';
|
|
|
|
export const { useGetUserPreferencesQuery, usePatchUserPreferencesMutation, useUpdateUserPreferencesMutation } =
|
|
generatedAPI;
|
|
|
|
export const userPreferencesAPI = generatedAPI.enhanceEndpoints({
|
|
addTagTypes: ['UserPreferences'],
|
|
endpoints: {
|
|
getUserPreferences: {
|
|
providesTags: ['UserPreferences'],
|
|
},
|
|
updateUserPreferences: {
|
|
invalidatesTags: ['UserPreferences'],
|
|
},
|
|
patchUserPreferences: {
|
|
invalidatesTags: ['UserPreferences'],
|
|
},
|
|
},
|
|
});
|