mirror of https://gitee.com/answerdev/answer.git
fix(plugin): fix rank config about question show/hide
This commit is contained in:
parent
031954520c
commit
76dfc362c9
|
@ -366,10 +366,10 @@ func initConfigTable(engine *xorm.Engine) error {
|
||||||
{ID: 116, Key: "rank.question.reopen", Value: `-1`},
|
{ID: 116, Key: "rank.question.reopen", Value: `-1`},
|
||||||
{ID: 117, Key: "rank.tag.use_reserved_tag", Value: `-1`},
|
{ID: 117, Key: "rank.tag.use_reserved_tag", Value: `-1`},
|
||||||
{ID: 118, Key: "plugin.status", Value: `{}`},
|
{ID: 118, Key: "plugin.status", Value: `{}`},
|
||||||
{ID: 119, Key: "question.pin", Value: `-1`},
|
{ID: 119, Key: "rank.question.pin", Value: `-1`},
|
||||||
{ID: 120, Key: "question.unpin", Value: `-1`},
|
{ID: 120, Key: "rank.question.unpin", Value: `-1`},
|
||||||
{ID: 121, Key: "question.show", Value: `-1`},
|
{ID: 121, Key: "rank.question.show", Value: `-1`},
|
||||||
{ID: 122, Key: "question.hide", Value: `-1`},
|
{ID: 122, Key: "rank.question.hide", Value: `-1`},
|
||||||
}
|
}
|
||||||
_, err := engine.Insert(defaultConfigTable)
|
_, err := engine.Insert(defaultConfigTable)
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -63,10 +63,10 @@ func addRolePinAndHideFeatures(x *xorm.Engine) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
defaultConfigTable := []*entity.Config{
|
defaultConfigTable := []*entity.Config{
|
||||||
{ID: 119, Key: "question.pin", Value: `-1`},
|
{ID: 119, Key: "rank.question.pin", Value: `-1`},
|
||||||
{ID: 120, Key: "question.unpin", Value: `-1`},
|
{ID: 120, Key: "rank.question.unpin", Value: `-1`},
|
||||||
{ID: 121, Key: "question.show", Value: `-1`},
|
{ID: 121, Key: "rank.question.show", Value: `-1`},
|
||||||
{ID: 122, Key: "question.hide", Value: `-1`},
|
{ID: 122, Key: "rank.question.hide", Value: `-1`},
|
||||||
}
|
}
|
||||||
for _, c := range defaultConfigTable {
|
for _, c := range defaultConfigTable {
|
||||||
exist, err := x.Get(&entity.Config{ID: c.ID, Key: c.Key})
|
exist, err := x.Get(&entity.Config{ID: c.ID, Key: c.Key})
|
||||||
|
|
|
@ -10,10 +10,10 @@ const (
|
||||||
QuestionReopen = "question.reopen"
|
QuestionReopen = "question.reopen"
|
||||||
QuestionVoteUp = "question.vote_up"
|
QuestionVoteUp = "question.vote_up"
|
||||||
QuestionVoteDown = "question.vote_down"
|
QuestionVoteDown = "question.vote_down"
|
||||||
QuestionPin = "question.pin" //Top the question
|
QuestionPin = "question.pin"
|
||||||
QuestionUnPin = "question.unpin" //untop the question
|
QuestionUnPin = "question.unpin"
|
||||||
QuestionHide = "question.hide" //hide the question
|
QuestionHide = "question.hide"
|
||||||
QuestionShow = "question.show" //show the question
|
QuestionShow = "question.show"
|
||||||
AnswerAdd = "answer.add"
|
AnswerAdd = "answer.add"
|
||||||
AnswerEdit = "answer.edit"
|
AnswerEdit = "answer.edit"
|
||||||
AnswerEditWithoutReview = "answer.edit_without_review"
|
AnswerEditWithoutReview = "answer.edit_without_review"
|
||||||
|
|
Loading…
Reference in New Issue