🚨 Fix compiling failed
This commit is contained in:
		
							
								
								
									
										2
									
								
								go.mod
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.mod
									
									
									
									
									
								
							| @@ -12,6 +12,7 @@ require ( | ||||
| 	github.com/fatih/color v1.18.0 | ||||
| 	github.com/go-ap/activitypub v0.0.0-20250212090640-aeb6499ba581 | ||||
| 	github.com/go-playground/validator/v10 v10.22.1 | ||||
| 	github.com/goccy/go-json v0.10.3 | ||||
| 	github.com/gofiber/fiber/v2 v2.52.6 | ||||
| 	github.com/json-iterator/go v1.1.12 | ||||
| 	github.com/pemistahl/lingua-go v1.4.0 | ||||
| @@ -43,7 +44,6 @@ require ( | ||||
| 	github.com/go-playground/locales v0.14.1 // indirect | ||||
| 	github.com/go-playground/universal-translator v0.18.1 // indirect | ||||
| 	github.com/go-sql-driver/mysql v1.8.1 // indirect | ||||
| 	github.com/goccy/go-json v0.10.3 // indirect | ||||
| 	github.com/golang-jwt/jwt/v5 v5.2.1 // indirect | ||||
| 	github.com/golang/mock v1.6.0 // indirect | ||||
| 	github.com/google/uuid v1.6.0 // indirect | ||||
|   | ||||
							
								
								
									
										2
									
								
								go.sum
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								go.sum
									
									
									
									
									
								
							| @@ -4,8 +4,6 @@ git.solsynth.dev/hypernet/insight v0.0.0-20250129172551-974266b2c1d2 h1:dPBdssDI | ||||
| git.solsynth.dev/hypernet/insight v0.0.0-20250129172551-974266b2c1d2/go.mod h1:NKSTeRc1mgg726iaCLEBoYEcVroIrGU5w2rnGf92LWE= | ||||
| git.solsynth.dev/hypernet/nexus v0.0.0-20250329075932-d5422ab5b04c h1:XgdTgJxSAQuCbiG15hN5pY6chzcz8sX3Onm2itS+Ufs= | ||||
| git.solsynth.dev/hypernet/nexus v0.0.0-20250329075932-d5422ab5b04c/go.mod h1:5tk62VQ1DcbR0EAN2jAOqYxHiegUPEC805JlfQ/G19I= | ||||
| git.solsynth.dev/hypernet/paperclip v0.0.0-20250329095638-8f91649d2570 h1:Nmm7zNpE/9ni/JFRO331D+w0pGz6IBKiNCSyFFbqWFA= | ||||
| git.solsynth.dev/hypernet/paperclip v0.0.0-20250329095638-8f91649d2570/go.mod h1:TdFsd/W3e04GAFVOWXBP9acSYF+YpmSeSdocnvt/4IY= | ||||
| git.solsynth.dev/hypernet/paperclip v0.0.0-20250329141722-820d7a9f42e6 h1:n7MgY8/TRJZXO4EJKmRqmzJQmE0E0X02Vf/pNJjRfms= | ||||
| git.solsynth.dev/hypernet/paperclip v0.0.0-20250329141722-820d7a9f42e6/go.mod h1:TdFsd/W3e04GAFVOWXBP9acSYF+YpmSeSdocnvt/4IY= | ||||
| git.solsynth.dev/hypernet/passport v0.0.0-20250329100405-b327e0806279 h1:7eL9za4zGsoKImiCXkpGFdXcSYhdegSRVsXfBJq7Q5I= | ||||
|   | ||||
| @@ -69,9 +69,6 @@ func apUserOutbox(c *fiber.Ctx) error { | ||||
| 		return fiber.NewError(fiber.StatusInternalServerError, err.Error()) | ||||
| 	} else { | ||||
| 		for _, post := range posts { | ||||
| 			if post == nil { | ||||
| 				continue | ||||
| 			} | ||||
| 			var content string | ||||
| 			if val, ok := post.Body["content"].(string); ok { | ||||
| 				content = val | ||||
|   | ||||
| @@ -33,8 +33,8 @@ func listRecommendation(c *fiber.Ctx) error { | ||||
| 	if err != nil { | ||||
| 		return fiber.NewError(fiber.StatusInternalServerError, err.Error()) | ||||
| 	} | ||||
| 	newPostMap := lo.SliceToMap(newPosts, func(item *models.Post) (uint, models.Post) { | ||||
| 		return item.ID, *item | ||||
| 	newPostMap := lo.SliceToMap(newPosts, func(item models.Post) (uint, models.Post) { | ||||
| 		return item.ID, item | ||||
| 	}) | ||||
|  | ||||
| 	// Revert the position & truncate | ||||
| @@ -74,9 +74,7 @@ func listRecommendationShuffle(c *fiber.Ctx) error { | ||||
|  | ||||
| 	if c.QueryBool("truncate", true) { | ||||
| 		for _, item := range items { | ||||
| 			if item != nil { | ||||
| 				item = lo.ToPtr(services.TruncatePostContent(*item)) | ||||
| 			} | ||||
| 			item = services.TruncatePostContent(item) | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user