Created
November 5, 2019 00:07
-
-
Save jasonknight/9cd522a474980e9965c32231cdbbfa80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function renderPost(post) { | |
// some rendering logic | |
if ( getAdminEmails(users).indexOf(current_user.email) != -1 ) { | |
renderAdminControls(post); | |
} | |
} | |
$.getJSON('/posts',function (posts) { | |
posts.forEach( function (post) { | |
renderPost(post); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment