Skip to content

Commit f86ed4d

Browse files
committed
feat(reactive-rpc): 🎸 cleanup RemoteHistoryDemoServer
1 parent e1343ac commit f86ed4d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/json-crdt-repo/remote/RemoteHistoryDemoServer.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,20 @@ export class RemoteHistoryDemoServer implements RemoteHistory<Cursor, RemoteServ
3636
* it might have.
3737
*/
3838
public async read(id: string): Promise<{cursor: Cursor; model: RemoteServerModel; patches: RemoteServerPatch[]}> {
39-
const {block, patches} = await this.client.call('block.get', {id});
39+
const {model, patches} = await this.client.call('block.get', {id});
4040
return {
41-
cursor: block.seq,
42-
model: block,
43-
patches,
41+
cursor: model.seq,
42+
model,
43+
patches: [],
4444
};
4545
}
4646

4747
public async scanFwd(id: string, cursor: Cursor): Promise<{cursor: Cursor; patches: RemoteServerPatch[]}> {
4848
const limit = 100;
4949
const res = await this.client.call('block.scan', {
5050
id,
51-
min: cursor,
52-
max: cursor + limit,
51+
seq: cursor,
52+
limit: cursor + limit,
5353
});
5454
if (res.patches.length === 0) {
5555
return {
@@ -89,7 +89,7 @@ export class RemoteHistoryDemoServer implements RemoteHistory<Cursor, RemoteServ
8989
};
9090
}
9191

92-
public async delete?(id: string): Promise<void> {
92+
public async delete(id: string): Promise<void> {
9393
await this.client.call('block.del', {id});
9494
}
9595

0 commit comments

Comments
 (0)