import httpStatus from 'http-status';
import update from '../operations/update.js';
export const updateHandler = async (req)=>{
    const payloadRequest = req;
    const doc = await update({
        key: req.routeParams?.key,
        req: payloadRequest,
        user: payloadRequest?.user,
        value: payloadRequest.data.value || payloadRequest.data
    });
    return Response.json({
        doc,
        message: payloadRequest.t('general:updatedSuccessfully')
    }, {
        status: httpStatus.OK
    });
};

//# sourceMappingURL=update.js.map