File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -53,18 +53,25 @@ func publishArchiveEvent(event ArchiveEvent) {
5353
5454func stats_panel (c * gin.Context ) {
5555 identifier := c .Param ("identifier" )
56- // project := GetProject(identifier)
57- // if !project.Status.Public {
58- // c.JSON(403, gin.H{"error": "Project is not public"})
59- // return
60- // }
56+ project := GetProject (identifier )
57+ if ! project .Status .Public {
58+ c .JSON (403 , gin.H {"error" : "Project is not public" })
59+ return
60+ }
6161 c .HTML (200 , "stats.tmpl" , gin.H {
6262 "identifier" : identifier ,
6363 })
6464}
6565
6666func sse_stream (c * gin.Context ) {
6767 identifier := c .Param ("identifier" )
68+
69+ project := GetProject (identifier )
70+ if ! project .Status .Public {
71+ c .JSON (403 , gin.H {"error" : "Project is not public" })
72+ return
73+ }
74+
6875 returnsChan := make (chan valkey.PubSubMessage )
6976
7077 go func () {
You can’t perform that action at this time.
0 commit comments