diff --git a/src/app/problems/problem/problem.module.ts b/src/app/problems/problem/problem.module.ts index 2125ba9..4a9c064 100644 --- a/src/app/problems/problem/problem.module.ts +++ b/src/app/problems/problem/problem.module.ts @@ -14,6 +14,7 @@ import { RankingComponent } from './leaderboard/ranking'; import { SharingService } from './shared'; import { FormattingModule } from '../../shared'; import { CodeEditorModule } from '../../code-editor'; +import { SubmissionModule } from '../../submission-modal'; @NgModule({ imports: [ @@ -24,6 +25,7 @@ import { CodeEditorModule } from '../../code-editor'; FormattingModule, CodeEditorModule, + SubmissionModule, problemRouting ], declarations: [ diff --git a/src/app/shared/services/index.ts b/src/app/shared/services/index.ts index 8afdb05..41421ff 100644 --- a/src/app/shared/services/index.ts +++ b/src/app/shared/services/index.ts @@ -1,2 +1 @@ export * from './login-modal.service'; -export * from './submission.service'; diff --git a/src/app/shared/services/submission.service.ts b/src/app/shared/services/submission.service.ts deleted file mode 100644 index e28be5b..0000000 --- a/src/app/shared/services/submission.service.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Http, Headers } from '@angular/http'; -import { Observable } from 'rxjs'; -import { Result, Submission } from '../'; - -const Url = 'http://code.neumont.edu/submit'; -const RequestHeaders = new Headers({ - 'Content-Type': 'application/json' -}); - -@Injectable() -export class SubmissionService { - constructor(private http: Http) {} - - submit(submission: Submission): Observable { - return this.http - .post(Url, submission, {headers: RequestHeaders}) - .map(res => res.json() as Result); - } -} diff --git a/src/app/submission-modal/index.ts b/src/app/submission-modal/index.ts index e8748c7..e698a40 100644 --- a/src/app/submission-modal/index.ts +++ b/src/app/submission-modal/index.ts @@ -1,2 +1,2 @@ export * from './submission-modal.component'; -export * from './submission-modal.module'; +export * from './submission.module'; diff --git a/src/app/submission-modal/submission-modal.component.html b/src/app/submission-modal/submission-modal.component.html index 7c3c523..1ae9e97 100644 --- a/src/app/submission-modal/submission-modal.component.html +++ b/src/app/submission-modal/submission-modal.component.html @@ -1,5 +1,8 @@ + + +