openpassphrase/opp

support for ordering categories

DmitryEfimenko opened this issue · 0 comments

Implement support for ordering categories.

  • fetchall api is supposed to return categories and items with orderNum field
  • A new API POST method: updateCategoryOrderNum which will take the following payload:
{
  categoryId: number;
  previousIndex: number;
  currentIndex: number;
}

Similar method should be available for sorting items within category.
One corner-case to think about is what happens with orderNums of the items of a category that's being deleted (preserving items).