Move docs to new page (#4)

Also verify citizen ID on  story edit page
This commit is contained in:
2021-01-31 21:57:48 -05:00
parent 46882bdfc6
commit a5c88a1034
4 changed files with 115 additions and 63 deletions

View File

@@ -43,12 +43,19 @@ namespace JobsJobsJobs.Client.Pages.SuccessStory
var story = await ServerApi.RetrieveOne<Success>(http, $"success/{Id}");
if (story.IsOk && story.Ok != null)
{
Form = new StoryForm
if (story.Ok.CitizenId == state.User!.Id)
{
Id = story.Ok.Id.ToString(),
FromHere = story.Ok.FromHere,
Story = story.Ok.Story?.Text ?? ""
};
Form = new StoryForm
{
Id = story.Ok.Id.ToString(),
FromHere = story.Ok.FromHere,
Story = story.Ok.Story?.Text ?? ""
};
}
else
{
errors.Add("Stop messing with the URL");
}
}
else if (story.IsOk)
{