fix: use access_token when deleting attachment

This commit is contained in:
thecodrr
2022-02-28 12:59:58 +05:00
parent 13f324878b
commit f455442b76

View File

@@ -65,7 +65,7 @@ export default class FileStorage {
async deleteFile(filename, localOnly) { async deleteFile(filename, localOnly) {
if (localOnly) return await this.fs.deleteFile(filename); if (localOnly) return await this.fs.deleteFile(filename);
const token = await this.tokenManager.getToken(); const token = await this.tokenManager.getAccessToken();
const url = `${hosts.API_HOST}/s3?name=${filename}`; const url = `${hosts.API_HOST}/s3?name=${filename}`;
return await this.fs.deleteFile(filename, { return await this.fs.deleteFile(filename, {
url, url,