Skip to content
This repository was archived by the owner on Dec 18, 2022. It is now read-only.

Commit 9688269

Browse files
committed
Fix firebase and parse initialization 😢
1 parent 8fe8ed3 commit 9688269

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
],
4747
"dependencies": {
4848
"firebase-admin": "^8.10.0",
49-
"parse": "^2.12.0",
5049
"parse-cloud-image": "^1.0.0"
5150
}
5251
}

src/FirebaseAuthAdapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class FirebaseAuthAdapter {
2020
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Firebase auth not found for this user.')
2121
}
2222
catch (error) {
23-
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, error)
23+
throw new Parse.Error(Parse.Error.OBJECT_NOT_FOUND, 'Firebase auth is invalid for this user.')
2424
}
2525
}
2626

src/FirebaseStorageAdapter.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Request, Response } from 'express';
33
import { required, optional, persists, isImage, generateThumbnails } from './utils';
44
import * as admin from 'firebase-admin';
55
import { Bucket } from '@google-cloud/storage';
6-
import { Config } from 'parse/node';
76

87
export interface File {
98
filename: string;
@@ -61,11 +60,11 @@ export default class FirebaseStorageAdapter {
6160
return data[0]
6261
}
6362

64-
getFileLocation(config: Config, filename: string): string {
63+
getFileLocation(config: any, filename: string): string {
6564
if (this.directAccess) {
6665
return `https://storage.cloud.google.com/${this.bucket.name}/${filename}`
6766
} else {
68-
return (config.get('mount') + '/files/' + config.get('applicationId') + '/' + encodeURIComponent(filename));
67+
return `${config.mount}/files/${config.applicationId}/${encodeURIComponent(filename)}`
6968
}
7069
}
7170

0 commit comments

Comments
 (0)