added fxa auth to /params

This commit is contained in:
Danny Coates 2018-08-31 10:59:26 -07:00
parent 718d74fa50
commit fb7176d989
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
7 changed files with 41 additions and 18 deletions

View file

@ -56,7 +56,11 @@ export default function(state, emitter) {
});
emitter.on('changeLimit', async ({ file, value }) => {
await file.changeLimit(value);
const ok = await file.changeLimit(value, state.user);
if (!ok) {
// TODO
return;
}
state.storage.writeFile(file);
metrics.changedDownloadLimit(file);
});
@ -138,6 +142,7 @@ export default function(state, emitter) {
metrics.completedUpload(ownedFile);
state.storage.addFile(ownedFile);
// TODO integrate password and limit into /upload request
if (password) {
emitter.emit('password', { password, file: ownedFile });
}