Skip to content

Commit

Permalink
fix: signed url is returned as signedUrl
Browse files Browse the repository at this point in the history
matches the method name createSignedUrl
  • Loading branch information
inian committed Aug 14, 2022
1 parent 39bbe50 commit fb1efdf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/packages/StorageFileApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ export default class StorageFileApi {
expiresIn: number
): Promise<
| {
data: { signedURL: string }
data: { signedUrl: string }
error: null
}
| {
Expand All @@ -292,8 +292,8 @@ export default class StorageFileApi {
{ expiresIn },
{ headers: this.headers }
)
const signedURL = encodeURI(`${this.url}${data.signedURL}`)
data = { signedURL }
const signedUrl = encodeURI(`${this.url}${data.signedURL}`)
data = { signedUrl }
return { data, error: null }
} catch (error) {
if (isStorageError(error)) {
Expand All @@ -315,7 +315,7 @@ export default class StorageFileApi {
expiresIn: number
): Promise<
| {
data: { error: string | null; path: string | null; signedURL: string }[]
data: { error: string | null; path: string | null; signedUrl: string }[]
error: null
}
| {
Expand All @@ -333,7 +333,7 @@ export default class StorageFileApi {
return {
data: data.map((datum: { signedURL: string }) => ({
...datum,
signedURL: datum.signedURL ? encodeURI(`${this.url}${datum.signedURL}`) : null,
signedUrl: datum.signedURL ? encodeURI(`${this.url}${datum.signedURL}`) : null,
})),
error: null,
}
Expand Down

0 comments on commit fb1efdf

Please sign in to comment.