added hmac auth to report route
Co-authored-by: timvisee <tim@visee.me>
This commit is contained in:
parent
bc0ccc8e5d
commit
f64e772145
3 changed files with 10 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
import Nanobus from 'nanobus';
|
||||
import Keychain from './keychain';
|
||||
import { delay, bytes, streamToArrayBuffer } from './utils';
|
||||
import { downloadFile, metadata, getApiUrl } from './api';
|
||||
import { downloadFile, metadata, getApiUrl, reportLink } from './api';
|
||||
import { blobStream } from './streams';
|
||||
import Zip from './zip';
|
||||
|
||||
|
@ -53,6 +53,10 @@ export default class FileReceiver extends Nanobus {
|
|||
this.state = 'ready';
|
||||
}
|
||||
|
||||
async reportLink(reason) {
|
||||
await reportLink(this.fileInfo.id, this.keychain, reason);
|
||||
}
|
||||
|
||||
sendMessageToSw(msg) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const channel = new MessageChannel();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue