Skip to content

Commit

Permalink
remove api changes and only preselect style preset
Browse files Browse the repository at this point in the history
  • Loading branch information
chainchompa committed Aug 28, 2024
1 parent b2df909 commit 326de55
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 36 deletions.
12 changes: 0 additions & 12 deletions invokeai/app/api/routers/style_presets.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ async def get_style_preset(
raise HTTPException(status_code=404, detail="Style preset not found")


@style_presets_router.post(
"/i/{style_preset_id}",
operation_id="select_style_preset",
)
async def select_style_preset(
style_preset_id: str = Path(description="The style preset to select"),
) -> None:
"""Selects a style preset, this will be used for saving recently used style presets"""

return


@style_presets_router.patch(
"/i/{style_preset_id}",
operation_id="update_style_preset",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ import type { AppDispatch, RootState } from 'app/store/store';

import { addArchivedOrDeletedBoardListener } from './listeners/addArchivedOrDeletedBoardListener';
import { addEnqueueRequestedUpscale } from './listeners/enqueueRequestedUpscale';
import { addStylePresetSelectedListener } from './listeners/stylePresetSelected';

export const listenerMiddleware = createListenerMiddleware();

Expand Down Expand Up @@ -124,9 +123,6 @@ addImageRemovedFromBoardFulfilledListener(startAppListening);
addBoardIdSelectedListener(startAppListening);
addArchivedOrDeletedBoardListener(startAppListening);

// Style Presets
addStylePresetSelectedListener(startAppListening);

// Node schemas
addGetOpenAPISchemaListener(startAppListening);

Expand Down

This file was deleted.

14 changes: 9 additions & 5 deletions invokeai/frontend/web/src/services/api/endpoints/stylePresets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ const buildStylePresetsUrl = (path: string = '') => buildV1Url(`style_presets/${

export const stylePresetsApi = api.injectEndpoints({
endpoints: (build) => ({
selectStylePreset: build.mutation<void, string>({
query: (style_preset_id) => ({
url: buildStylePresetsUrl(`i/${style_preset_id}`),
method: 'POST',
}),
getStylePreset: build.query<
paths['/api/v1/style_presets/i/{style_preset_id}']['get']['responses']['200']['content']['application/json'],
string
>({
query: (style_preset_id) => buildStylePresetsUrl(`i/${style_preset_id}`),
providesTags: (result, error, style_preset_id) => [
{ type: 'StylePreset', id: style_preset_id },
'FetchOnReconnect',
],
}),
deleteStylePreset: build.mutation<void, string>({
query: (style_preset_id) => ({
Expand Down

0 comments on commit 326de55

Please sign in to comment.