Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoValue for created_at and updated_at #1661

Merged
merged 1 commit into from
Sep 29, 2016

Conversation

brylie
Copy link
Contributor

@brylie brylie commented Sep 29, 2016

Closes #1595
Closes #1652

Changes

  • autoValue Api created_at field on insert
  • autoValue Api updated_at field on update

@jykae
Copy link
Contributor

jykae commented Sep 29, 2016

@brylie reviewing

} else {
this.unset(); // Prevent user from supplying their own value
}
},
},
created_by: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brylie I think we should add value on creation for this, if we want to keep this field and make use of it at some point.

if (this.isUpdate) {
return new Date();
}
},
},
updated_by: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also value here on update.

@jykae
Copy link
Contributor

jykae commented Sep 29, 2016

Decided with @brylie to fix created/updated by fields as enhancement task #1663

@jykae
Copy link
Contributor

jykae commented Sep 29, 2016

Merging

@jykae jykae merged commit f853111 into develop Sep 29, 2016
@jykae jykae removed the in progress label Sep 29, 2016
@jykae jykae deleted the feature/fix-api-created-updated-dates branch September 29, 2016 12:41
@ilarimikkonen ilarimikkonen added this to In Review in apinf/platform Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants