mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Change $type of date for todos (#12779)
* change $type to date for task and add new test * adjust apidocs to reflect type change * migration test for api date $type change * minor fixes to migration * unset instead of set empty string * add type filter * fix(todo date migration): make sure the update command works and limit update ops Co-authored-by: Matteo Pagliazzi <matteopagliazzi@gmail.com>
This commit is contained in:
@@ -404,8 +404,7 @@ export const daily = Task.discriminator('daily', DailySchema);
|
||||
|
||||
export const TodoSchema = new Schema(_.defaults({
|
||||
dateCompleted: Date,
|
||||
// TODO we're getting parse errors, people have stored as "today" and "3/13". Need to run a migration & put this back to $type: Date see http://stackoverflow.com/questions/1353684/detecting-an-invalid-date-date-instance-in-javascript
|
||||
date: String, // due date for todos
|
||||
date: Date, // due date for todos
|
||||
}, dailyTodoSchema()), subDiscriminatorOptions);
|
||||
export const todo = Task.discriminator('todo', TodoSchema);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user