refac: 변경한 DTO에 따라 코드 수정
- Spatie/DataTransferObject 대비
- MapFrom,MapTo -> RawName
- Strict -> 항상
- 심지어 raw type도 더 까다롭게
- array에 MapConverter 적용
- NullIsUndefined 적용
- 빈 nullable arg자리에 null 강제 지정
- Vue3에 v-model.number 지정
- input type="number" 기준
This commit is contained in:
@@ -29,6 +29,7 @@ class AddComment extends \sammo\BaseAPI
|
||||
if (!$v->validate()) {
|
||||
return $v->errorStr();
|
||||
}
|
||||
$this->args['voteID'] = (int)$this->args['voteID'];
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -46,11 +47,12 @@ class AddComment extends \sammo\BaseAPI
|
||||
|
||||
|
||||
$comment = new VoteComment(
|
||||
vote_id: $voteID,
|
||||
general_id: $generalID,
|
||||
nation_id: $nationID,
|
||||
nation_name: $nationName,
|
||||
general_name: $generalName,
|
||||
id: null,
|
||||
voteID: $voteID,
|
||||
generalID: $generalID,
|
||||
nationID: $nationID,
|
||||
nationName: $nationName,
|
||||
generalName: $generalName,
|
||||
text: $text,
|
||||
date: $date
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user