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

Delete organisation #15

Merged
merged 12 commits into from
Oct 10, 2019
Merged

Delete organisation #15

merged 12 commits into from
Oct 10, 2019

Conversation

prabhanshuguptagit
Copy link
Contributor

Note: Raised against #12 for reviews only. Change base to master before merge.

([user-id org-id]
(get-permission (config/db-spec) user-id org-id))
([conn user-id org-id]
(-> (jdbc/query conn (-> (h/select :permission)
Copy link
Member

Choose a reason for hiding this comment

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

jdbc/find-by-keys?

(jdbc/with-db-transaction [trn (config/db-spec)]
(if (is-owner? trn id user-id)
(if-not (empty? (db/delete! trn id))
{:success "Organisation deleted"})
Copy link
Member

Choose a reason for hiding this comment

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

Since the else section is missing here, this returns nil. Is that okay?


(defn show-alert-bottom
[status message & [time]]
(let [time (if (number? time) (* time 1000) 4000)]
Copy link
Member

Choose a reason for hiding this comment

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

number? seems like the wrong check here. are you checking for presence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Checking if time is a number and is not nil.

Copy link
Collaborator

@yudistrange yudistrange left a comment

Choose a reason for hiding this comment

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

looks fine.

@prabhanshuguptagit prabhanshuguptagit changed the base branch from sidebar-navigate-orgs to master October 10, 2019 06:19
@prabhanshuguptagit prabhanshuguptagit merged commit dde8f07 into master Oct 10, 2019
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.

3 participants