Merge branch 'dev' into test
This commit is contained in:
@@ -65,8 +65,6 @@ archives:
|
||||
dst: NOTICE
|
||||
- src: "docs/release/licenses/*"
|
||||
dst: licenses/
|
||||
- src: "DISCLAIMER"
|
||||
dst: DISCLAIMER
|
||||
wrap_in_directory: true
|
||||
checksum:
|
||||
name_template: 'checksums.txt'
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
Apache Answer is an effort undergoing incubation at the Apache
|
||||
Software Foundation (ASF), sponsored by the Apache Incubator PMC.
|
||||
|
||||
Incubation is required of all newly accepted projects until a further review
|
||||
indicates that the infrastructure, communications, and decision making process
|
||||
have stabilized in a manner consistent with other successful ASF projects.
|
||||
|
||||
While incubation status is not necessarily a reflection of the completeness
|
||||
or stability of the code, it does indicate that the project has yet to be
|
||||
fully endorsed by the ASF.
|
||||
@@ -284,10 +284,6 @@ func (ac *AnswerController) Add(ctx *gin.Context) {
|
||||
objectOwner := ac.rankService.CheckOperationObjectOwner(ctx, req.UserID, info.ID)
|
||||
req.CanEdit = canList[0] || objectOwner
|
||||
req.CanDelete = canList[1] || objectOwner
|
||||
if !can {
|
||||
handler.HandleResponse(ctx, errors.Forbidden(reason.RankFailToMeetTheCondition), nil)
|
||||
return
|
||||
}
|
||||
info.MemberActions = permission.GetAnswerPermission(ctx, req.UserID, info.UserID,
|
||||
0, req.CanEdit, req.CanDelete, false)
|
||||
handler.HandleResponse(ctx, nil, gin.H{
|
||||
|
||||
+3
-3
@@ -34,9 +34,9 @@ type SnowFlakeID struct {
|
||||
var snowFlakeIDGenerator *SnowFlakeID
|
||||
|
||||
func init() {
|
||||
// todo
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
node, err := snowflake.NewNode(int64(rand.Intn(1000)) + 1)
|
||||
source := rand.NewSource(time.Now().UnixNano())
|
||||
r := rand.New(source)
|
||||
node, err := snowflake.NewNode(int64(r.Intn(1000)) + 1)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user