Skip to content

Commit

Permalink
fix: secu + data
Browse files Browse the repository at this point in the history
  • Loading branch information
remy-auricoste committed Nov 14, 2023
1 parent beaa06e commit 2ae4bdf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/src/http/routes/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default (server: Server) => {
"/user/:userId/history",
{
schema: zRoutes.put["/user/:userId/history"],
preHandler: [],
onRequest: [server.auth(zRoutes.put["/user/:userId/history"])],
},
async (req, res) => {
const history = req.body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ export const ConfirmationDesactivationUtilisateur = ({
onClose,
isOpen,
onUpdate,
}: { userRecruteur: IUserRecruteurJson; onUpdate?: () => void } & ReturnType<typeof useDisclosure>) => {
const { establishment_raison_sociale, _id: _idObject, type, establishment_id, establishment_siret } = userRecruteur
const _id = _idObject.toString()
}: { userRecruteur?: IUserRecruteurJson; onUpdate?: () => void } & ReturnType<typeof useDisclosure>) => {
const { establishment_raison_sociale, _id: _idObject, type, establishment_id, establishment_siret } = userRecruteur ?? {}
const _id = (_idObject ?? "").toString()
const [reason, setReason] = useState()
const reasonComment = useDisclosure()
const disableUser = useUserHistoryUpdate(_id, ETAT_UTILISATEUR.DESACTIVE, reason)
const reassignUserToAdmin = useUserHistoryUpdate(_id, ETAT_UTILISATEUR.ATTENTE, reason)

if (!userRecruteur) return null

const handleReason = (value) => {
if (value === "Autre") {
reasonComment.onOpen()
Expand Down

0 comments on commit 2ae4bdf

Please sign in to comment.