เเก้ type SupportIssueCategory
เเละ ตั้งค่า Socket .ใหม่
This commit is contained in:
parent
b4c4325cd1
commit
7a579ab4cc
4 changed files with 13 additions and 10 deletions
|
|
@ -12,6 +12,8 @@ export const supportMessage = (id: string) =>
|
|||
export const supportMessageStatus = (id: string) =>
|
||||
`${env.API_SUPPORT_URI}/issue/${id}/message-status`;
|
||||
|
||||
export const supportSocket = `${env.API_SUPPORT_SOCKET}`;
|
||||
|
||||
export default {
|
||||
supportIssue,
|
||||
supportCategory,
|
||||
|
|
@ -19,4 +21,5 @@ export default {
|
|||
supportMessageStatus,
|
||||
supportIssueChangeStatus,
|
||||
supportCategoryAction,
|
||||
supportSocket,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const config = ref<any>({
|
|||
API_REPORT_TEMPLATE_URI:
|
||||
"https://report-server.frappet.synology.me/api/v1/report-template",
|
||||
API_SUPPORT_URI: "http://192.168.1.10:3000/api/v1/support",
|
||||
API_SUPPORT_SOCKET: "http://192.168.1.10:3000/",
|
||||
},
|
||||
test: {
|
||||
API_URI: "http://localhost:5010/api/v1",
|
||||
|
|
@ -64,6 +65,9 @@ const config = ref<any>({
|
|||
});
|
||||
|
||||
const API_SUPPORT_URI = ref<string>(config.value[env.value].API_SUPPORT_URI);
|
||||
const API_SUPPORT_SOCKET = ref<string>(
|
||||
config.value[env.value].API_SUPPORT_SOCKET
|
||||
);
|
||||
const API_URI = ref<string>(config.value[env.value].API_URI);
|
||||
const API_CANDIDATE_URI = ref<string>(
|
||||
config.value[env.value].API_CANDIDATE_URI
|
||||
|
|
@ -115,4 +119,5 @@ export default {
|
|||
LINK_EVALUATE_PUBLISH: LINK_EVALUATE_PUBLISH.value,
|
||||
API_REPORT_TEMPLATE_URI: API_REPORT_TEMPLATE_URI.value,
|
||||
API_SUPPORT_URI: API_SUPPORT_URI.value,
|
||||
API_SUPPORT_SOCKET: API_SUPPORT_SOCKET.value,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,8 +37,10 @@ export interface SupportIssue {
|
|||
}
|
||||
|
||||
export interface SupportIssueCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
result: {
|
||||
id: string;
|
||||
name: string;
|
||||
}[];
|
||||
}
|
||||
|
||||
export interface SupportMessageResponse {
|
||||
|
|
@ -69,10 +71,3 @@ export interface SupportIssueMessage {
|
|||
read: boolean;
|
||||
issueId: string;
|
||||
}
|
||||
|
||||
export type {
|
||||
SupportMessageStatus,
|
||||
SupportMessageResponse,
|
||||
SupportIssueResponse,
|
||||
SupportStatusUser,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export const useSupportStore = defineStore("supportServiceStore", () => {
|
|||
}, 150);
|
||||
}
|
||||
|
||||
const socket = io("http://192.168.1.10:3000/", {
|
||||
const socket = io(config.API.supportSocket, {
|
||||
auth: { token: keycloak.token },
|
||||
autoConnect: false,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue