Skip to content

Commit

Permalink
chore: temp remove index
Browse files Browse the repository at this point in the history
  • Loading branch information
pociej committed Apr 10, 2024
1 parent 74239a4 commit 23b43e1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
5 changes: 0 additions & 5 deletions backend/src/services/user/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ const schema = new mongoose.Schema<IUser>(
type: Boolean,
required: true,
},
id: {
type: String,
required: true,
index: { unique: true },
},
},
],
},
Expand Down
11 changes: 5 additions & 6 deletions backend/src/services/user/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ const randomNonce = () => {
export const userService: IUserService = {
registerUser: async (walletAddress: string) => {
const user = await userModel.findOne({ walletAddress });
console.log("#########################");
console.log("registering user");
console.log("model", mongoose.connection);
console.log("user", user);
console.log("#########################");

if (user !== null) {
return user;
}
return new userModel(
console.log("no user");
const newu = await new userModel(
{
walletAddress,
nonce: randomNonce(),
Expand All @@ -29,6 +26,8 @@ export const userService: IUserService = {
_id: true,
}
).save();
console.log("new user", newu);
return newu;
},
regenerateNonce: async (userId: string) => {
const nonce = randomNonce();
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/allowanceSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const AllowanceSummary = ({ isVisible }: { isVisible: boolean }) => {
borderRadius: "16px",
padding: "1rem",
fontSize: "1.3rem",
minWidth: "380px",
minWidth: "350px",
}}
>
<h3>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/registerSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const RegisterSummary = ({ isVisible }: { isVisible: boolean }) => {
borderRadius: "16px",
padding: "1rem",
fontSize: "1.3rem",
minWidth: "380px",
minWidth: "350px",
}}
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
Expand Down

0 comments on commit 23b43e1

Please sign in to comment.