Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sfcode
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ayush
sfcode
Commits
6227a756
Commit
6227a756
authored
Dec 07, 2020
by
Adarsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor change
parent
280a8daa
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
src/app/file.service.ts
src/app/file.service.ts
+1
-0
src/app/home/home.component.html
src/app/home/home.component.html
+7
-7
src/app/question.service.ts
src/app/question.service.ts
+1
-1
No files found.
src/app/file.service.ts
View file @
6227a756
...
@@ -45,6 +45,7 @@ export class FileService {
...
@@ -45,6 +45,7 @@ export class FileService {
formData
.
append
(
'
file
'
,
file
,
file
.
name
);
formData
.
append
(
'
file
'
,
file
,
file
.
name
);
return
this
.
http
.
post
(
this
.
uploadUrl
,
formData
);
return
this
.
http
.
post
(
this
.
uploadUrl
,
formData
);
}
}
delete
(
file
):
Observable
<
any
>
{
delete
(
file
):
Observable
<
any
>
{
return
this
.
http
.
post
(
this
.
deleteUrl
,
file
);
return
this
.
http
.
post
(
this
.
deleteUrl
,
file
);
}
}
...
...
src/app/home/home.component.html
View file @
6227a756
...
@@ -8,14 +8,14 @@
...
@@ -8,14 +8,14 @@
<form
class=
"formContainer"
id=
"quesform"
(ngSubmit) =
"submitForm()"
>
<form
class=
"formContainer"
id=
"quesform"
(ngSubmit) =
"submitForm()"
>
<input
type=
"text"
id=
"title"
placeholder=
"Problem Title"
name=
"title"
[(ngModel)]=
"questiontoPost.title"
required
>
<input
type=
"text"
id=
"title"
placeholder=
"Problem Title"
name=
"title"
[(ngModel)]=
"questiontoPost.title"
required
>
<textarea
id=
"statement"
placeholder=
"Problem Statement"
rows=
"8"
cols=
"80
"
required
></textarea>
<textarea
id=
"statement"
placeholder=
"Problem Statement"
name=
"statement"
rows=
"8"
cols=
"80"
[(ngModel)]=
"questiontoPost.statement
"
required
></textarea>
<textarea
id=
"tc1_i"
cols=
"30"
rows=
"8"
placeholder=
"Testcase1 Input"
style=
"margin-right: 20px;
"
></textarea>
<textarea
id=
"tc1_i"
cols=
"30"
rows=
"8"
name=
"tc1"
placeholder=
"Testcase1 Input"
style=
"margin-right: 20px;"
[(ngModel)]=
"questiontoPost.tc1_inp
"
></textarea>
<textarea
id=
"tc2_i"
cols=
"30"
rows=
"8"
placeholder=
"Testcase2 Input"
style=
"margin-left: 20px;
"
></textarea>
<textarea
id=
"tc2_i"
cols=
"30"
rows=
"8"
name=
"tc2"
placeholder=
"Testcase2 Input"
style=
"margin-left: 20px;"
[(ngModel)]=
"questiontoPost.tc2_inp
"
></textarea>
<textarea
id=
"tc1_o"
cols=
"30"
rows=
"4"
placeholder=
"Testcase1 Output"
style=
"margin-right: 20px;
"
></textarea>
<textarea
id=
"tc1_o"
cols=
"30"
rows=
"4"
name=
"out1"
placeholder=
"Testcase1 Output"
style=
"margin-right: 20px;"
[(ngModel)]=
"questiontoPost.tc1_out
"
></textarea>
<textarea
id=
"tc2_o"
cols=
"30"
rows=
"4"
placeholder=
"Testcase2 Output"
style=
"margin-left: 20px;
"
></textarea>
<textarea
id=
"tc2_o"
cols=
"30"
rows=
"4"
name=
"out2"
placeholder=
"Testcase2 Output"
style=
"margin-left: 20px;"
[(ngModel)]=
"questiontoPost.tc2_out
"
></textarea>
<input
type=
"datetime-local"
id=
"
start_time"
>
<input
type=
"datetime-local"
name=
"stime"
id=
"start_time"
[(ngModel)]=
"questiontoPost.
start_time"
>
<input
type=
"datetime-local"
id=
"
end_time"
>
<input
type=
"datetime-local"
name=
"etime"
id=
"end_time"
[(ngModel)]=
"questiontoPost.
end_time"
>
<button
type=
"submit"
class=
"btn"
(click) =
"submitForm()"
>
Submit
</button>
<button
type=
"submit"
class=
"btn"
(click) =
"submitForm()"
>
Submit
</button>
<button
type=
"button"
class=
"btn cancel"
(click) =
"closeForm()"
>
Close
</button>
<button
type=
"button"
class=
"btn cancel"
(click) =
"closeForm()"
>
Close
</button>
...
...
src/app/question.service.ts
View file @
6227a756
...
@@ -15,7 +15,7 @@ export class QuestionService {
...
@@ -15,7 +15,7 @@ export class QuestionService {
constructor
(
private
http
:
HttpClient
)
{
}
constructor
(
private
http
:
HttpClient
)
{
}
uploadQues
(
ques
):
Observable
<
any
>
{
uploadQues
(
ques
:
Question
):
Observable
<
any
>
{
return
this
.
http
.
post
(
this
.
uploadUrl
,
ques
);
return
this
.
http
.
post
(
this
.
uploadUrl
,
ques
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment