made api for items to display in categories index. items currently still being displayed using erb