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

Den dev #66

Closed
wants to merge 18 commits into from
Closed

Den dev #66

wants to merge 18 commits into from

Conversation

TartuDen
Copy link
Collaborator

No description provided.

@TartuDen
Copy link
Collaborator Author

I added edit/delete buttons.
I made the pull request, so we can even both branches, i don't like that my branch is getting outdated.
Not solved issue is:
I didn't have time to create any validation for edit/delete, so DO NOT push it ONLINE YET! let's do validation first, if you want i can do it myself tomorrow, or you can take a look.

Copy link
Owner

@Pomog Pomog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

visitor validation absent


func (m *Repository) EditTopicHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost {

do we need post method here


func (m *Repository) EditTopicResultHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost {

new post validation absent


func (m *Repository) DeleteTopicHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost {
postID, err1 := strconv.Atoi(r.URL.Query().Get("postID"))

postID - validation needed


func (m *SqliteBDRepo) EditPost(post models.Post) error {
postID - validation needed


func (m *SqliteBDRepo) DeletePost(post models.Post) error {
postID - validation needed

Copy link
Owner

@Pomog Pomog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validations should be added

@TartuDen
Copy link
Collaborator Author

unc (m *Repository) EditTopicHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == http.MethodPost {

do we need post method here - yes, it does not work without post method

@TartuDen TartuDen closed this Dec 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants