finalised repository route
Transformed return type to Either