|
|
@@ -4,49 +4,41 @@ const host = process.env.NODE_ENV === 'development' ? 'http://localhost:8080' :
|
|
|
const wsHost = process.env.NODE_ENV === 'development' ? 'ws://localhost:8080' : 'ws://' + location.host
|
|
|
|
|
|
const slideUrl = host + '/api/slide'
|
|
|
-
|
|
|
const useSlideServer = postfix => postfix ? slideUrl + postfix : slideUrl
|
|
|
|
|
|
const courseFileUrl = host + '/api/courseFile'
|
|
|
-
|
|
|
const useCourseFileServer = postfix => postfix ? courseFileUrl + postfix : courseFileUrl
|
|
|
|
|
|
const courseUrl = host + '/api/course'
|
|
|
-
|
|
|
const useCourseServer = postfix => postfix ? courseUrl + postfix : courseUrl
|
|
|
|
|
|
const codeUrl = host + '/api/code'
|
|
|
-
|
|
|
const useCodeServer = postfix => postfix ? codeUrl + postfix : codeUrl
|
|
|
|
|
|
const userUrl = host + '/api/user'
|
|
|
-
|
|
|
const useUserServer = postfix => postfix ? userUrl + postfix : userUrl
|
|
|
|
|
|
const commentUrl = host + '/api/comment'
|
|
|
-
|
|
|
const useCommentServer = postfix => postfix ? commentUrl + postfix : commentUrl
|
|
|
|
|
|
const messageUrl = host + '/api/message'
|
|
|
-
|
|
|
const useMessageServer = postfix => postfix ? messageUrl + postfix : messageUrl
|
|
|
|
|
|
-const replyUrl = host + '/api/reply'
|
|
|
+const NoticeUrl = host + '/api/notice'
|
|
|
+const useNoticeServer = postfix => postfix ? NoticeUrl + postfix : NoticeUrl
|
|
|
|
|
|
+const replyUrl = host + '/api/reply'
|
|
|
const useReplyServer = postfix => postfix ? replyUrl + postfix : replyUrl
|
|
|
|
|
|
const commentWsUrl = wsHost + '/api/ws/comment'
|
|
|
-
|
|
|
const useCommentWsServer = postfix => postfix ? commentWsUrl + postfix : commentWsUrl
|
|
|
|
|
|
// const quizUrl = host + '/api/quiz'
|
|
|
const quizUrl = '/api/quiz'
|
|
|
-
|
|
|
const useQuizServer = (postfix = '') => quizUrl + postfix
|
|
|
|
|
|
// const questionUrl = host + '/api/question'
|
|
|
const questionUrl = '/api/question'
|
|
|
-
|
|
|
const useQuestionServer = (postfix = '') => questionUrl + postfix
|
|
|
|
|
|
export {
|
|
|
@@ -59,6 +51,7 @@ export {
|
|
|
useReplyServer,
|
|
|
useCommentWsServer,
|
|
|
useMessageServer,
|
|
|
+ useNoticeServer,
|
|
|
useQuizServer,
|
|
|
useQuestionServer
|
|
|
}
|