Cleaned code
This commit is contained in:
+5
-7
@@ -6,13 +6,11 @@
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.jetbrains.jdbc.sqlserver.SqlServerDriver</jdbc-driver>
|
||||
<jdbc-url>Server=romaric-thibault.fr,1433</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
<data-source source="LOCAL" name="@romaric-thibault.fr [2]" uuid="ca3f05f9-1785-497e-bb80-adf40963d717">
|
||||
<driver-ref>sqlserver.jb</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.jetbrains.jdbc.sqlserver.SqlServerDriver</jdbc-driver>
|
||||
<jdbc-url>Server=romaric-thibault.fr,1433</jdbc-url>
|
||||
<jdbc-additional-properties>
|
||||
<property name="com.intellij.clouds.kubernetes.db.host.port" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.enabled" value="false" />
|
||||
<property name="com.intellij.clouds.kubernetes.db.container.port" />
|
||||
</jdbc-additional-properties>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="db-tree-configuration">
|
||||
<option name="data" value="---------------------------------------- 1:0:d39cb28a-f071-4fe6-bb03-b2350028b821 2:0:ca3f05f9-1785-497e-bb80-adf40963d717 " />
|
||||
<option name="data" value="---------------------------------------- 1:0:d39cb28a-f071-4fe6-bb03-b2350028b821 " />
|
||||
</component>
|
||||
</project>
|
||||
@@ -43,7 +43,7 @@ public class UnlockAchievementEndpoint(
|
||||
UserId = userId,
|
||||
AchievementId = req.AchievementId
|
||||
};
|
||||
|
||||
|
||||
await userAchievementsRepository.AddAsync(userAchievement, ct);
|
||||
await Send.NoContentAsync(ct);
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ public class DeleteMessageEndpoint(MessagesRepository messagesRepository) : Endp
|
||||
await Send.NotFoundAsync(ct);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
await messagesRepository.DeleteAsync(message, ct);
|
||||
await Send.NoContentAsync(ct);
|
||||
}
|
||||
|
||||
@@ -44,12 +44,12 @@ public class GenerateRandomChallengeEndpoint(
|
||||
UserId = user.Id,
|
||||
RandomChallengeId = randomChallenge.Id
|
||||
}).ToList();
|
||||
|
||||
|
||||
await userRandomChallengesRepository.AddRangeAsync(userRandomChallenges, ct);
|
||||
|
||||
randomChallenge.IsAlreadyPast = true;
|
||||
await randomChallengesRepository.SaveChangesAsync(ct);
|
||||
|
||||
|
||||
await Send.NoContentAsync(ct);
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ public class PatchProofEndpoint(
|
||||
|
||||
if (userRandomChallenge.Proof is not null)
|
||||
{
|
||||
await Send.StringAsync("Vous avez déjà déposé une preuve",400, cancellation:ct);
|
||||
await Send.StringAsync("Vous avez déjà déposé une preuve", 400, cancellation: ct);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ public class PatchProofEndpoint(
|
||||
await Send.NotFoundAsync(ct);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
mapper.Map(req, userRandomChallenge);
|
||||
user.Score++; // 1pts bonus
|
||||
|
||||
user.Score++; // 1pts bonus
|
||||
|
||||
await userRandomChallengesRepository.SaveChangesAsync(ct);
|
||||
await Send.NoContentAsync(ct);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user