add index method todo lists api controller