fix: Collector bug on undefined body

This commit is contained in:
KernelDeimos 2024-10-29 18:55:58 -04:00
parent b9625945ae
commit 14f477a633

View File

@ -29,7 +29,7 @@ export default def(class Collector {
async get (route) { async get (route) {
return await this.fetch({ method: 'get', route }); return await this.fetch({ method: 'get', route });
} }
async post (route, body) { async post (route, body = {}) {
if ( this.antiCSRF ) { if ( this.antiCSRF ) {
body.anti_csrf = await this.antiCSRF.token(); body.anti_csrf = await this.antiCSRF.token();
} }