remove debug endpoint
This commit is contained in:
		
							
								
								
									
										15
									
								
								apps/mod.lua
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								apps/mod.lua
									
									
									
									
									
								
							| @@ -1,5 +1,4 @@ | ||||
| local app = require("lapis").Application() | ||||
| local babycode = require("lib.babycode") | ||||
|  | ||||
| local db = require("lapis.db") | ||||
|  | ||||
| @@ -44,18 +43,4 @@ app:post("sort_topics", "/sort-topics", function(self) | ||||
|   return {redirect_to = self:url_for("sort_topics")} | ||||
| end) | ||||
|  | ||||
| app:get("reparse_posts", "/reparse-posts", function(self) | ||||
|   db.query("BEGIN") | ||||
|   local hist = db.select("* FROM post_history") | ||||
|   for _, history in ipairs(hist) do | ||||
|     db.query( | ||||
|       "UPDATE post_history SET content = ? WHERE post_history.id = ?", | ||||
|       babycode.to_html(history.original_markup, require("lapis.html").escape), | ||||
|       history.id | ||||
|     ) | ||||
|   end | ||||
|   db.query("COMMIT") | ||||
|   return "ok" | ||||
| end) | ||||
|  | ||||
| return app | ||||
|   | ||||
		Reference in New Issue
	
	Block a user