Commit 42ec9d0e authored by shahriar's avatar shahriar
Browse files

makke change status api case insensitive

parent 1a740823
...@@ -96,7 +96,10 @@ export class LotteryService { ...@@ -96,7 +96,10 @@ export class LotteryService {
async changeStatus(changeStatus: ChangeStatusDto) { async changeStatus(changeStatus: ChangeStatusDto) {
const foundUser = await this.userModel.findOne({ const foundUser = await this.userModel.findOne({
username: changeStatus.username, username: {
$regex: changeStatus.username,
$options: 'i',
},
}); });
if (!foundUser) { if (!foundUser) {
throw new NotFoundException( throw new NotFoundException(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment