Skip to content

Commit e5d3190

Browse files
authored
Update README.md
1 parent 04e184e commit e5d3190

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,10 @@ const error = (op) => (data) => {
7878
op.abort();
7979
};
8080

81-
operator
82-
.copy(from, to, names)
83-
.then((op) => {
84-
op.on('progress', progress);
85-
op.on('end', end(op));
86-
op.on('error', error(op));
87-
});
81+
const op = await operator.copy(from, to, names);
82+
83+
op.on('progress', progress);
84+
op.on('end', end(op)); op.on('error', error(op));
8885
```
8986

9087
## Server

0 commit comments

Comments
 (0)