Skip to content

Commit

Permalink
Use session id on client and remove client dir
Browse files Browse the repository at this point in the history
  • Loading branch information
benjreinhart committed Jul 26, 2024
1 parent e757da3 commit 9cbac61
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions packages/api/session.mts
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,6 @@ export function sessionToResponse(session: SessionType) {
id: session.id,
cells: session.cells,
metadata: session.metadata,
// Only pass the dir ID to the client, making it easier to use it as an identifier in urls
dir: Path.basename(session.dir),
'tsconfig.json': session['tsconfig.json'],
openedAt: session.openedAt,
};
Expand All @@ -301,8 +299,6 @@ export function sessionToResponse(session: SessionType) {
id: session.id,
cells: session.cells,
metadata: session.metadata,
// Only pass the dir ID to the client, making it easier to use it as an identifier in urls
dir: Path.basename(session.dir),
openedAt: session.openedAt,
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/components/delete-srcbook-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default function DeleteSrcbookModal({
if (!session) return;

const onConfirmDelete = async () => {
deleteSrcbook({ id: session.dir })
deleteSrcbook({ id: session.id })
.then(() => {
onOpenChange(false);
navigate('/', { replace: true });
Expand Down
1 change: 0 additions & 1 deletion packages/web/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export type OutputType = StdoutOutputType | StderrOutputType;

export type SessionType = {
id: string;
dir: string;
cells: CellType[];
metadata: SrcbookMetadataType;
// TODO: Better typing.
Expand Down

0 comments on commit 9cbac61

Please sign in to comment.