mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-29 06:41:09 +00:00
fixes
This commit is contained in:
parent
14e6382765
commit
995106dfc1
3 changed files with 9 additions and 8 deletions
|
@ -212,7 +212,8 @@ impl ApiClient {
|
|||
|
||||
pub async fn resolve_instance(&self, id: Url) -> MyResult<DbInstance> {
|
||||
let resolve_object = ResolveObject { id };
|
||||
self.get("/api/v1/user", Some(resolve_object)).await
|
||||
self.get("/api/v1/instance/resolve", Some(resolve_object))
|
||||
.await
|
||||
}
|
||||
pub async fn get_user(&self, data: GetUserForm) -> MyResult<DbPerson> {
|
||||
self.get("/api/v1/user", Some(data)).await
|
||||
|
|
|
@ -107,10 +107,10 @@ pub fn App() -> impl IntoView {
|
|||
// TODO: use protected route, otherwise user can view
|
||||
// /article/create without login
|
||||
// https://github.com/leptos-rs/leptos/blob/leptos_0.7/examples/router/src/lib.rs#L51
|
||||
<Route path=path!("/article/create") view=CreateArticle />
|
||||
<Route path=path!("/article/list") view=ListArticles />
|
||||
<Route path=path!("/create-article") view=CreateArticle />
|
||||
<Route path=path!("/articles") view=ListArticles />
|
||||
<Route path=path!("/instances") view=ListInstances />
|
||||
<Route path=path!("/instance/:hostname") view=InstanceDetails />
|
||||
<Route path=path!("/instance/list") view=ListInstances />
|
||||
<Route path=path!("/user/:name") view=UserProfile />
|
||||
<Route path=path!("/login") view=Login />
|
||||
<Route path=path!("/register") view=Register />
|
||||
|
|
|
@ -45,15 +45,15 @@ pub fn Nav() -> impl IntoView {
|
|||
<A href="/">"Main Page"</A>
|
||||
</li>
|
||||
<li>
|
||||
<A href="/instance/list">"Instances"</A>
|
||||
<A href="/instances">"Instances"</A>
|
||||
</li>
|
||||
<li>
|
||||
<A href="/article/list">"Articles"</A>
|
||||
<A href="/articles">"Articles"</A>
|
||||
</li>
|
||||
<Transition>
|
||||
<Show when=is_logged_in>
|
||||
<li>
|
||||
<A href="/article/create">"Create Article"</A>
|
||||
<A href="/create-article">"Create Article"</A>
|
||||
</li>
|
||||
<li>
|
||||
<A href="/notifications">
|
||||
|
|
Loading…
Reference in a new issue