generated from xgeekshq/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(auth-azure): upload and set user photo on login (#1132)
- Loading branch information
Rui Silva
authored
Feb 21, 2023
1 parent
b559d5d
commit c48b625
Showing
30 changed files
with
871 additions
and
173 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export const CONNECTION_STRING = 'storage.connectionString'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
import { Module } from '@nestjs/common'; | ||
import AuthModule from '../auth/auth.module'; | ||
import { CommunicationModule } from '../communication/communication.module'; | ||
import { StorageModule } from '../storage/storage.module'; | ||
import UsersModule from '../users/users.module'; | ||
import { authAzureApplication, authAzureService, cronAzureService } from './azure.providers'; | ||
import { authAzureApplication, authAzureService } from './azure.providers'; | ||
import AzureController from './controller/azure.controller'; | ||
|
||
@Module({ | ||
imports: [UsersModule, AuthModule, CommunicationModule], | ||
imports: [UsersModule, AuthModule, CommunicationModule, StorageModule], | ||
controllers: [AzureController], | ||
providers: [cronAzureService, authAzureService, authAzureApplication] | ||
providers: [authAzureService, authAzureApplication] | ||
}) | ||
export default class AzureModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
backend/src/modules/azure/interfaces/services/cron.azure.service.interface.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
backend/src/modules/storage/interfaces/services/storage.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { BlobDeleteResponse } from '@azure/storage-blob'; | ||
|
||
export interface StorageServiceInterface { | ||
uploadFile( | ||
fileName: string, | ||
file: { originalname: string; buffer: Buffer; mimetype: string }, | ||
containerName?: string | ||
): Promise<string>; | ||
deleteFile(fileUrl: string, containerName?: string): Promise<void | BlobDeleteResponse>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export const TYPES = { | ||
services: { | ||
StorageService: 'StorageService' | ||
} | ||
}; | ||
|
||
export enum ContainerNameEnum { | ||
SPLIT_IMAGES = 'split-images' | ||
} | ||
|
||
export type ContainerName = `${ContainerNameEnum}`; |
Oops, something went wrong.