Commit 9392f2e8 authored by André Espaze's avatar André Espaze
Browse files

Make api part of the path as used in elm/Plot.elm

parent 32995f076cc1
......@@ -112,7 +112,7 @@ update msg model =
mkUrl serieName =
UB.crossOrigin model.urlPrefix
[ "series", "state" ]
[ "api", "series", "state" ]
[ UB.string "name" serieName ]
in
( model, Cmd.batch <| List.map (mkUrl >> delete expect) model.selectedSeries )
......@@ -182,7 +182,7 @@ main =
{ expect = Http.expectJson CatalogReceived (Decode.dict Decode.string)
, url =
UB.crossOrigin urlPrefix
[ "series", "catalog" ]
[ "api", "series", "catalog" ]
[]
}
......
......@@ -69,7 +69,7 @@ getCatalog urlPrefix =
{ expect = Http.expectJson CatalogReceived (Decode.dict Decode.string)
, url =
UB.crossOrigin urlPrefix
[ "series", "catalog" ]
[ "api", "series", "catalog" ]
[]
}
......@@ -154,7 +154,7 @@ update msg model =
url =
UB.crossOrigin model.urlPrefix
[ "series", "state" ]
[ "api", "series", "state" ]
[ UB.string "name" <|
Maybe.withDefault "" model.selectedSerie
, UB.string "newname" model.renamedSerie
......
......@@ -100,11 +100,11 @@ def tsview(engine, tshclass=timeseries, serie_names=serie_names):
@bp.route('/tsdelete')
def tsdelete():
return render_template('tsedit.html',
edit_kind="Delete", urlprefix="api")
edit_kind="Delete", urlprefix="")
@bp.route('/tsrename')
def tsrename():
return render_template('tsedit.html',
edit_kind="Rename", urlprefix="api")
edit_kind="Rename", urlprefix="")
return bp
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment