Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

routing /pagename or /id #1

Open
gurugeek opened this issue Jan 27, 2019 · 0 comments
Open

routing /pagename or /id #1

gurugeek opened this issue Jan 27, 2019 · 0 comments

Comments

@gurugeek
Copy link

first of all thanks for Essen 👍
This is not really a bug but I wanted to be sure that I didn't get this part wrong. At the moment there is no way to display the page name/id directly in the route right ?

I am using

e.Get("/pages", func(res essen.Response, req essen.Request) {
		page := req.Req.URL.Query().Get("page")

		var a Page

		err := db.QueryRow("SELECT * FROM pages where page = ?", page).Scan(&a.Page, &a.Content, &a.Date)

this works with a route like /pages?page=about but not for /about

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant