- added own provider for drive methods

- renamed middleware Role and Can to role_middleware and can_middleware
- added some typing for inertia vue3 components
- npm updates
This commit is contained in:
Kaimbacher 2024-04-23 19:36:45 +02:00
commit 296c8fd46e
67 changed files with 2515 additions and 1913 deletions

View file

@ -7,7 +7,8 @@ import BaseModel from './BaseModel.js';
import * as fs from 'fs';
import crypto from 'crypto';
// import Drive from '@ioc:Adonis/Core/Drive';
import Drive from '@adonisjs/drive';
// import Drive from '@adonisjs/drive';
import drive from '#services/drive';
import type { HasMany } from "@adonisjs/lucid/types/relations";
import type { BelongsTo } from "@adonisjs/lucid/types/relations";
@ -164,7 +165,7 @@ export default class File extends BaseModel {
public async delete() {
if (this.pathName) {
// Delete file from additional storage
await Drive.delete(this.pathName);
await drive.delete(this.pathName);
}
// Call the original delete method of the BaseModel to remove the record from the database