+
- {{ $luxonDateTime.fromISO(post.updatedAt.toString(), { locale: locale }).toRelativeCalendar() }}
- {{ post.updatedBy.fullName }}
+ {{ $luxonDateTime.fromISO(post.updated.at.toString(), { locale: locale }).toRelativeCalendar() }}
+ {{ post.updated.by }}
@@ -71,7 +71,7 @@
import DisplayTags from "@client/components/DisplayTags.vue";
import { faClock } from "@fortawesome/free-regular-svg-icons";
import { faBookReader, faEdit, faTrash } from "@fortawesome/free-solid-svg-icons";
-import type { Post, UserRolePermissionsType } from "@fumix/fu-blog-common";
+import type { Post, PublicPost, UserRolePermissionsType } from "@fumix/fu-blog-common";
import type { PropType } from "vue";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
@@ -82,7 +82,7 @@ const locale = useI18n().locale.value;
const props = defineProps({
post: {
- type: Object as PropType
,
+ type: Object as PropType,
required: true,
},
userPermissions: {
diff --git a/client/src/util/api-client.ts b/client/src/util/api-client.ts
index 4446a93..408d3b3 100644
--- a/client/src/util/api-client.ts
+++ b/client/src/util/api-client.ts
@@ -7,7 +7,7 @@ import type {
JsonMimeType,
LoggedInUserInfo,
NewPostRequestDto,
- Post,
+ PublicPost,
SupportedImageMimeType,
} from "@fumix/fu-blog-common";
import { HttpHeader, imageBytesToDataUrl } from "@fumix/fu-blog-common";
@@ -141,7 +141,7 @@ export class PostEndpoints {
}
static async findPosts(pageIndex: number, itemsPerPage = 12, search: string | undefined = undefined, operator: "and" | "or" = "and") {
- return callServer(
+ return callServer(
`/api/posts/page/${pageIndex}/count/${itemsPerPage}${search ? `/search/${encodeURIComponent(search)}/operator/${operator}` : ""}###`,
"GET",
"application/json",
diff --git a/client/src/views/PostView.vue b/client/src/views/PostView.vue
index 3518992..65c9f38 100644
--- a/client/src/views/PostView.vue
+++ b/client/src/views/PostView.vue
@@ -46,7 +46,7 @@
{{ post.updatedBy.fullName }}