Commit 01f2596b authored by shahriar's avatar shahriar
Browse files

trim input param

parent 89c12e64
...@@ -5,7 +5,8 @@ import sys ...@@ -5,7 +5,8 @@ import sys
username = str(sys.argv[1]) username = str(sys.argv[1])
password = str(sys.argv[2]) password = str(sys.argv[2])
mongo_connection_string = "mongodb://instagram:wcD3B5sGw0yQ@185.231.180.248:27017/instagram-lottry?authSource=admin&authMechanism=SCRAM-SHA-256" # mongo_connection_string = "mongodb://instagram:wcD3B5sGw0yQ@185.231.180.248:27017/instagram-lottry?authSource=admin&authMechanism=SCRAM-SHA-256"
mongo_connection_string = "mongodb://localhost:27017/?serverSelectionTimeoutMS=5000&connectTimeoutMS=10000"
database_name = "instagram-lottry" database_name = "instagram-lottry"
post_short_code = str(sys.argv[3]) post_short_code = str(sys.argv[3])
PROFILE = str(sys.argv[4]) PROFILE = str(sys.argv[4])
......
...@@ -5,7 +5,8 @@ import sys ...@@ -5,7 +5,8 @@ import sys
username = str(sys.argv[1]) username = str(sys.argv[1])
password = str(sys.argv[2]) password = str(sys.argv[2])
mongo_connection_string = "mongodb://instagram:wcD3B5sGw0yQ@185.231.180.248:27017/instagram-lottry?authSource=admin&authMechanism=SCRAM-SHA-256" # mongo_connection_string = "mongodb://instagram:wcD3B5sGw0yQ@185.231.180.248:27017/instagram-lottry?authSource=admin&authMechanism=SCRAM-SHA-256"
mongo_connection_string = "mongodb://localhost:27017/?serverSelectionTimeoutMS=5000&connectTimeoutMS=10000"
database_name = "instagram-lottry" database_name = "instagram-lottry"
post_short_code = str(sys.argv[3]) post_short_code = str(sys.argv[3])
PROFILE = str(sys.argv[4]) PROFILE = str(sys.argv[4])
......
...@@ -97,7 +97,7 @@ export class LotteryService { ...@@ -97,7 +97,7 @@ export class LotteryService {
async changeStatus(changeStatus: ChangeStatusDto) { async changeStatus(changeStatus: ChangeStatusDto) {
const foundUser = await this.userModel.findOne({ const foundUser = await this.userModel.findOne({
username: { username: {
$regex: changeStatus.username, $regex: changeStatus.username.trim(),
$options: 'i', $options: 'i',
}, },
}) })
......
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