fix generate excel in admin account
This commit is contained in:
@@ -208,11 +208,13 @@ export const getTimeEntryWithRelations = async (req, res) => {
|
||||
*/
|
||||
export const updateTimeEntry = async (req, res) => {
|
||||
try {
|
||||
const userId = req.userId;
|
||||
const { entryId } = req.params;
|
||||
const { startTime, endTime, projectId, todoId, companyId, description } = req.body;
|
||||
|
||||
const entry = await timeTrackingService.updateTimeEntry(entryId, userId, {
|
||||
const entry = await timeTrackingService.updateTimeEntry(entryId, {
|
||||
userId: req.userId,
|
||||
role: req.user.role,
|
||||
}, {
|
||||
startTime,
|
||||
endTime,
|
||||
projectId,
|
||||
@@ -238,10 +240,12 @@ export const updateTimeEntry = async (req, res) => {
|
||||
*/
|
||||
export const deleteTimeEntry = async (req, res) => {
|
||||
try {
|
||||
const userId = req.userId;
|
||||
const { entryId } = req.params;
|
||||
|
||||
const result = await timeTrackingService.deleteTimeEntry(entryId, userId);
|
||||
const result = await timeTrackingService.deleteTimeEntry(entryId, {
|
||||
userId: req.userId,
|
||||
role: req.user.role,
|
||||
});
|
||||
|
||||
res.status(200).json(result);
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user