diff --git a/src/components/content/Sidebar.vue b/src/components/content/Sidebar.vue
index af5b50f3..c133c54e 100644
--- a/src/components/content/Sidebar.vue
+++ b/src/components/content/Sidebar.vue
@@ -12,18 +12,25 @@
{{ $t('content.nav.platform') }}
+
+
+
+
+ {{ $t('content.nav.publication') }}
+
+
+
diff --git a/src/router/content.ts b/src/router/content.ts
index 68f0d757..af1a941e 100644
--- a/src/router/content.ts
+++ b/src/router/content.ts
@@ -46,6 +46,14 @@ export default {
title: t('common.nav.platform')
},
component: () => import('@/pages/content/platform/Index.vue')
+ },
+ {
+ path: 'publication',
+ name: 'publication-index',
+ meta: {
+ title: t('common.nav.publication')
+ },
+ component: () => import('@/pages/content/publication/Index.vue')
}
]
};
diff --git a/src/services/content/publication/service.ts b/src/services/content/publication/service.ts
new file mode 100644
index 00000000..33852253
--- /dev/null
+++ b/src/services/content/publication/service.ts
@@ -0,0 +1,29 @@
+import { AxiosResponse } from 'axios';
+import httpClient from '../../instance';
+import { IPublication, IPublicationDetailResponse, IPublicationListResponse } from './types';
+
+class PublicationService {
+ key = 'publications';
+
+ async getAll(): Promise> {
+ return await httpClient.get(`/${this.key}/`);
+ }
+
+ async get(id: number): Promise> {
+ return await httpClient.get(`/${this.key}/${id}`);
+ }
+
+ async create(data: IPublication): Promise> {
+ return await httpClient.post(`/${this.key}/`, data);
+ }
+
+ async update(id: number, data: IPublication): Promise> {
+ return await httpClient.put(`/${this.key}/${id}`, data);
+ }
+
+ async delete(id: number): Promise> {
+ return await httpClient.delete(`/${this.key}/${id}`);
+ }
+}
+
+export default new PublicationService();
diff --git a/src/services/content/publication/types.ts b/src/services/content/publication/types.ts
new file mode 100644
index 00000000..cab02b3b
--- /dev/null
+++ b/src/services/content/publication/types.ts
@@ -0,0 +1,12 @@
+export interface IPublication {
+ id: number;
+ name: string;
+ state: string;
+}
+
+export interface IPublicationListResponse {
+ count: number;
+ results: IPublication[];
+}
+
+export interface IPublicationDetailResponse extends IPublication {}
diff --git a/src/services/index.ts b/src/services/index.ts
index 53fcbdca..aff63bad 100644
--- a/src/services/index.ts
+++ b/src/services/index.ts
@@ -1,4 +1,5 @@
import ArticleService from './content/article/service';
import PlatformService from './content/platform/service';
+import PublicationService from './content/publication/service';
-export { ArticleService, PlatformService };
+export { ArticleService, PlatformService, PublicationService };