Fix addEndpoint route