api database queries: generic findOne with _id condition to findById