Skip to content

Commit

Permalink
chore: code tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Mar 28, 2024
1 parent 7572c4c commit ce10297
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { ViewMonitoringFormsComponent } from './pages/view/view-monitoring-forms
component: FormSubmissionsComponent,
},
{
path: ':id/update',
path: ':id/edit',
component: UpdateMonitoringFormsComponent,
},
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<h2 style="flex: 1">Monitoring Form View</h2>
@if(form){
<div class="action-button-section">
<button mat-raised-button color="primary" routerLink="update">Upload new form</button>
<button mat-raised-button color="primary" routerLink="edit">Edit Form</button>
<button mat-raised-button color="primary" routerLink="submissions">View Submissions</button>
</div>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export class SupabaseUploadComponent {

private async checkDuplicateUpload(file: UppyFile) {
const storageFile = await this.storageService.getFile({
bucketId: 'resources',
bucketId: this.storageBucketName,
filename: file.name,
folderPath: this.storageFolderPath || '',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ export class SupabaseStorageService {
return data?.[0] || null;
}

public async deleteFile(bucketId: string, filePath: string) {
return this.storage.from(bucketId).remove([filePath]);
}

/** Return the link to a file in a public bucket */
public getPublicLink(bucketId: string, objectPath: string) {
return this.storage.from(bucketId).getPublicUrl(objectPath).data.publicUrl;
Expand Down

0 comments on commit ce10297

Please sign in to comment.