Skip to content

Commit

Permalink
Tidy type definitions.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpfs committed Dec 10, 2024
1 parent 548abc4 commit c8f1f33
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
9 changes: 4 additions & 5 deletions crates/ipc/src/web_service/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ where
};

let path = if let Some(path) = &request.path {
tracing::debug!(
path = %path,
"copy_clipboard::json_path");

let Ok(path) = JsonPath::parse(path) else {
return internal_server_error("json_path::parse");
};
Expand All @@ -50,11 +54,6 @@ where
None
};

tracing::debug!(
target = ?request.target,
path = ?path,
"copy_clipboard");

let accounts = accounts.read().await;
match accounts
.copy_clipboard(&account_id, &request.target, path.as_ref())
Expand Down
10 changes: 5 additions & 5 deletions packages/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ export enum Kind {
}

export type EmbeddedFileContent = {
name: string,
mime: string,
buffer: number[],
checksum: never,
name: string;
mime: string;
buffer: number[];
checksum: string;
}

export type ExternalFileContent = {
name: String;
mime: String;
checksum: never;
checksum: string;
size: number;
path?: string;
}
Expand Down
10 changes: 5 additions & 5 deletions packages/types/preamble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ export enum Kind {
}

export type EmbeddedFileContent = {
name: string,
mime: string,
buffer: number[],
checksum: never,
name: string;
mime: string;
buffer: number[];
checksum: string;
}

export type ExternalFileContent = {
name: String;
mime: String;
checksum: never;
checksum: string;
size: number;
path?: string;
}
Expand Down

0 comments on commit c8f1f33

Please sign in to comment.