Skip to content

Commit

Permalink
Merge branch 'please-stop-messing-this-up' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cmayeux05 committed Mar 6, 2024
2 parents bf0b4c1 + 92a3321 commit 25ea0bc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const DayDetailModal = ({
<Input.TextArea
onChange={e => setDescription(e.target.value)}
value={description}
//required
required
placeholder="Enter description"
></Input.TextArea>
</Form.Item>
Expand All @@ -186,7 +186,7 @@ const DayDetailModal = ({
onChange={e => setTekS(e.target.value)}
value={TekS}
className="input"
//required
required
placeholder="Enter tekS"
></Input>
</Form.Item>
Expand Down
4 changes: 2 additions & 2 deletions client/src/views/ContentCreator/LessonEditor/LessonEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,15 @@ export default function LessonEditor({
onChange={e => setDescription(e.target.value)}
value={description}
rows={3}
//required
required
placeholder="Enter lesson description"
/>
</Form.Item>
<Form.Item id="form-label" label="Teks">
<Input
onChange={e => setTeks(e.target.value)}
value={teks}
//required
required
placeholder="Enter lesson teks"
/>
</Form.Item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = {

// validate the request
const { name, expectations, teks } = ctx.request.body;
if (!name)
if (!expectations || !name || !teks)
return ctx.badRequest('A name, teks and expectations must be provided!', {
id: 'Learning-standard.update.body.invalid',
error: 'ValidationError',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"required": true
},
"expectations": {
"type": "text",
"required": false
"type": "text"
},
"days": {
"via": "learning_standard",
Expand All @@ -33,8 +32,7 @@
},
"teks": {
"type": "string",
"unique": false,
"required": false
"unique": false
},
"link": {
"type": "string"
Expand Down
6 changes: 3 additions & 3 deletions server/api/unit/controllers/unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ module.exports = {
if (
!strapi.services.validator.isPositiveInt(number) ||
!strapi.services.validator.isPositiveInt(gradeId) ||
// !teks_id ||
!name
// !teks_description
!teks_id ||
!name ||
!teks_description
)
return ctx.badRequest(
'A grade, name, teks_description must be provided! Number and Teks_id must be positive interger! ',
Expand Down

0 comments on commit 25ea0bc

Please sign in to comment.