Skip to content

Commit

Permalink
Merge pull request #1710 from qdraw/feature/202409_code_smells_12
Browse files Browse the repository at this point in the history
Feature/202409 code smells 12
  • Loading branch information
qdraw authored Sep 12, 2024
2 parents a9d0bb5 + a2260a2 commit 3a98805
Show file tree
Hide file tree
Showing 36 changed files with 2,641 additions and 9,884 deletions.
5 changes: 5 additions & 0 deletions starsky/starsky/Controllers/ThumbnailGenerationController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ public ThumbnailGenerationController(ISelectorStorage selectorStorage,
[Produces("application/json")]
public async Task<IActionResult> ThumbnailGeneration(string f)
{
if ( !ModelState.IsValid )
{
return BadRequest("Model invalid");
}

var subPath = f != "/" ? PathHelper.RemoveLatestSlash(f) : "/";
var subPathStorage = _selectorStorage.Get(SelectorStorage.StorageServices.SubPath);

Expand Down
11 changes: 8 additions & 3 deletions starsky/starsky/Controllers/TrashController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public TrashController(IMoveToTrashService moveToTrashService)
}

/// <summary>
/// Move a file to the trash
/// Move a file to the trash
/// </summary>
/// <param name="f">subPath filepath to file, split by dot comma (;)</param>
/// <param name="collections">stack collections</param>
Expand All @@ -36,6 +36,11 @@ public TrashController(IMoveToTrashService moveToTrashService)
[Produces("application/json")]
public async Task<IActionResult> TrashMoveAsync(string f, bool collections = false)
{
if ( !ModelState.IsValid )
{
return BadRequest("Model invalid");
}

var inputFilePaths = PathHelper.SplitInputFilePaths(f);
if ( inputFilePaths.Length == 0 )
{
Expand All @@ -49,8 +54,8 @@ public async Task<IActionResult> TrashMoveAsync(string f, bool collections = fal
}

/// <summary>
/// Is the system trash supported
/// Used in End2End tests to enable or disable the trash
/// Is the system trash supported
/// Used in End2End tests to enable or disable the trash
/// </summary>
/// <returns>bool with json (IActionResult Result)</returns>
/// <response code="200">the item including the updated content</response>
Expand Down
14 changes: 10 additions & 4 deletions starsky/starsky/clientapp/.storybook/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,26 @@ import type { StorybookConfig } from "@storybook/react-vite";

const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions"
],
],

framework: {
name: "@storybook/react-vite",
options: {}
},
docs: {
autodocs: "tag"
},

docs: {},

core: {
disableTelemetry: true // 👈 Disables telemetry
},

typescript: {
reactDocgen: "react-docgen-typescript"
}
};
export default config;
Loading

1 comment on commit 3a98805

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.