-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merge delete and save picture controllers
- Loading branch information
1 parent
4a2f47a
commit 73a8a81
Showing
10 changed files
with
25 additions
and
69 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './controller' | ||
export * from './facebook-login' | ||
export * from './delete-picture' | ||
export * from './save-picture' |
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.
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,2 +1,2 @@ | ||
export * from './facebook-login' | ||
export * from './delete-picture' | ||
export * from './save-picture' |
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,6 @@ | ||
import { makeChangeProfilePicture } from '@/main/factories/domain/use-cases' | ||
import { SavePictureController } from '@/application/controllers' | ||
|
||
export const makeSavePictureController = (): SavePictureController => { | ||
return new SavePictureController(makeChangeProfilePicture()) | ||
} |
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,9 +1,9 @@ | ||
import { adaptExpressRoute as adapt } from '@/main/adapters' | ||
import { makeDeletePictureController } from '@/main/factories/application/controllers' | ||
import { makeSavePictureController } from '@/main/factories/application/controllers' | ||
import { auth } from '@/main/middlewares' | ||
|
||
import { Router } from 'express' | ||
|
||
export default (router: Router): void => { | ||
router.delete('/users/picture', auth, adapt(makeDeletePictureController())) | ||
router.delete('/users/picture', auth, adapt(makeSavePictureController())) | ||
} |
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 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