Skip to content

Commit

Permalink
hotfix: upload cv
Browse files Browse the repository at this point in the history
  • Loading branch information
dinisjcorreia committed Nov 27, 2024
1 parent dab0e82 commit a781644
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"editor.formatOnSave": true,
"prettier.printWidth": 160,
"prettier.tabWidth": 2,
"cSpell.words": ["fallstack"]
"cSpell.words": ["fallstack"],
"[dotenv]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
9 changes: 9 additions & 0 deletions src/lib/completeAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ export async function completeAction(studentCode: string, actionName: string) {

if (!action) return null;

const alreadyCompleted = await prisma.actionCompletion.findFirst({
where: {
studentCode,
actionId: action.id,
},
});

if (alreadyCompleted) return null;

const studentAction = await prisma.actionCompletion.create({
data: {
studentCode,
Expand Down

0 comments on commit a781644

Please sign in to comment.