Skip to content

Commit 833dd56

Browse files
committed
Merge branch 'home-page-editor-page' into post-ms6
# Conflicts: # peerprep/.env.example # peerprep/api/gateway.ts # peerprep/api/structs.ts # peerprep/app/api/internal/questions/helper.ts # peerprep/app/api/internal/questions/route.ts # peerprep/app/questions/new/page.tsx # peerprep/components/shared/PeerprepButton.tsx # peerprep/package-lock.json # peerprep/package.json
2 parents 7f3a449 + b13dd9a commit 833dd56

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+6805
-881
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
**/.env
22
.idea
3-
*.log
3+
*.log
4+
main.exe

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cd ./peerprep && npx lint-staged

.lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#pre-commit:
2+
# parallel: true
3+
# commands:
4+
# golangci-lint:
5+
# glob: "*.go"
6+
# run: golangci-lint run {staged_files}
7+
# lint-staged:
8+
# root: "peerprep/"
9+
# glob: "*.(ts|tsx|css|scss|md|json)"
10+
# run: npx lint-staged

backend/transport/replace_question.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,21 +33,21 @@ func ReplaceQuestionWithLogger(db *database.QuestionDB, logger *common.Logger) g
3333
return
3434
}
3535

36-
if id_param >= db.FindNextQuestionId() {
37-
logger.Log.Info(
38-
"Attempting to update a question with an ID greater than next ID, creating a new question",
39-
)
40-
status, err := db.AddQuestion(logger, &new_question)
41-
42-
if err != nil {
43-
ctx.JSON(status, err.Error())
44-
return
45-
}
46-
47-
ctx.JSON(status, "Question added successfully")
48-
logger.Log.Info("Question added successfully")
49-
return
50-
}
36+
//if id_param >= db.FindNextQuestionId() {
37+
// logger.Log.Info(
38+
// "Attempting to update a question with an ID greater than next ID, creating a new question",
39+
// )
40+
// status, err := db.AddQuestion(logger, &new_question)
41+
//
42+
// if err != nil {
43+
// ctx.JSON(status, err.Error())
44+
// return
45+
// }
46+
//
47+
// ctx.JSON(status, "Question added successfully")
48+
// logger.Log.Info("Question added successfully")
49+
// return
50+
//}
5151

5252
logger.Log.Info("Replacing question with ID: ", id_param)
5353
new_question.Id = id_param

peerprep/.eslintrc.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": [
3+
"next/core-web-vitals",
4+
"next/typescript",
5+
"prettier"
6+
],
7+
"ignorePatterns": [
8+
"**/*.css",
9+
"**/*.scss"
10+
]
311
}

peerprep/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
.env
55
.dockerignore
66

7+
.eslintcache
8+
79
# dependencies
810
/node_modules
911
/.pnp

peerprep/.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

peerprep/.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint-staged

peerprep/.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage

peerprep/.prettierrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"plugins": ["prettier-plugin-tailwindcss"]
3+
}

0 commit comments

Comments
 (0)