bug: manager-api do not support add consumer with custom create time or update time
Bug report
Describe the bug
use manager-api add a consumer with custom create time or update time, but the consumer actually created does not use the custom time.
Hi, @idbeta, I can't get your point. Can you give me an example or steps to reproduce the issue?
hi, @starsz you can refer to https://github.com/apache/apisix-dashboard/pull/830/files#diff-d6674616f38aabf4e6e7f91f04b057982213b9b3758fc363ffc140843db957e3R344-R385 this case is failed, it will return the current timestamp.
OK, I reproduce the issue.
I don't think it is a bug, audit field should maintain by server not client.So we should not accept client audit field such as CreatedAt, CreatedBy etc.
Not sure if it's a bug indeed, what's your opinion? I would be more prefer with @ShiningRush's opinion 🤔
cc @membphis @nic-chen @liuxiran @tokers
I don't think it is a bug, audit field should maintain by server not client.So we should not accept client audit field such as
CreatedAt,CreatedByetc.
agree +1. If the user customizes these fields, it goes against the original intent of using these fields to record the time.
I don't think it is a bug, audit field should maintain by server not client.So we should not accept client audit field such as
CreatedAt,CreatedByetc.
agree +1
OK. So the conclusion is that we should not accept the client audit fields such as CreatedAt, CreatedBy. If the client put those fields, just ignore them.
Should we add this tip to FAQ?
At the beginning, I referred to the processing of adminAPI ( APISIX ). After reading your comments, I think manager-api does not need to be the same as adminAPI at this point. I will modify the related test cases.