Skip to content

Commit 77865d5

Browse files
committed
remove manually setting createdAt and updatedAt
1 parent e68f038 commit 77865d5

File tree

3 files changed

+0
-6
lines changed

3 files changed

+0
-6
lines changed

src/services/JobCandidateService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ async function createJobCandidate (currentUser, jobCandidate) {
9090
await helper.ensureUserById(jobCandidate.userId) // ensure user exists
9191

9292
jobCandidate.id = uuid()
93-
jobCandidate.createdAt = new Date()
9493
jobCandidate.createdBy = await helper.getUserId(currentUser.userId)
9594

9695
const created = await JobCandidate.create(jobCandidate)
@@ -126,7 +125,6 @@ async function updateJobCandidate (currentUser, id, data) {
126125
await helper.checkIsMemberOfProject(currentUser.userId, job.projectId)
127126
}
128127

129-
data.updatedAt = new Date()
130128
data.updatedBy = userId
131129

132130
const updated = await jobCandidate.update(data)

src/services/JobService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ async function createJob (currentUser, job) {
150150

151151
await _validateSkills(job.skills)
152152
job.id = uuid()
153-
job.createdAt = new Date()
154153
job.createdBy = await helper.getUserId(currentUser.userId)
155154

156155
const created = await Job.create(job)
@@ -199,7 +198,6 @@ async function updateJob (currentUser, id, data) {
199198
}
200199
}
201200

202-
data.updatedAt = new Date()
203201
data.updatedBy = ubahnUserId
204202

205203
const updated = await job.update(data)

src/services/ResourceBookingService.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ async function createResourceBooking (currentUser, resourceBooking) {
103103
await helper.ensureUserById(resourceBooking.userId) // ensure user exists
104104

105105
resourceBooking.id = uuid()
106-
resourceBooking.createdAt = new Date()
107106
resourceBooking.createdBy = await helper.getUserId(currentUser.userId)
108107

109108
const created = await ResourceBooking.create(resourceBooking)
@@ -142,7 +141,6 @@ async function updateResourceBooking (currentUser, id, data) {
142141
const resourceBooking = await ResourceBooking.findById(id)
143142
const oldValue = resourceBooking.toJSON()
144143

145-
data.updatedAt = new Date()
146144
data.updatedBy = await helper.getUserId(currentUser.userId)
147145

148146
const updated = await resourceBooking.update(data)

0 commit comments

Comments
 (0)