Remove lemmyResponse type
This commit is contained in:
		@@ -65,7 +65,7 @@ func (r *RoutesGenerator) Generate(routes []extractor.Route) error {
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
 | 
			
		||||
			g.Err().Op("=").Id("resError").Params(jen.Id("res"), jen.Id("resData").Dot("lemmyResponse"))
 | 
			
		||||
			g.Err().Op("=").Id("resError").Params(jen.Id("res"), jen.Id("resData").Dot("Error"))
 | 
			
		||||
			g.If(jen.Err().Op("!=").Nil()).BlockFunc(func(g *jen.Group) {
 | 
			
		||||
				if returnName == "emptyResponse" {
 | 
			
		||||
					g.Return(jen.Err())
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ func (s *StructGenerator) Generate(items []extractor.Struct) error {
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				if strings.HasSuffix(item.Name, "Response") {
 | 
			
		||||
					g.Id("lemmyResponse")
 | 
			
		||||
					g.Id("Error").Id("Optional").Types(jen.String()).Tag(map[string]string{"json": "error"})
 | 
			
		||||
				}
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user