Skip to main content

save_route

Function save_route 

Source
pub async fn save_route(pool: &PgPool, route: &Route) -> ProxyResult<Route>
Expand description

Insert a route, or replace it if one with the same id is already stored.

Returns the route as stored, with id filled in. A route arriving without one gets a fresh id rather than being rejected: the admin API generates ids itself, but a caller building a Route by hand should not have to.