File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ <h3 class="box-title">Available APIs</h3>
77 < div id ="example2_wrapper " class ="dataTables_wrapper form-inline dt-bootstrap ">
88 {{> tabular table=TabularTables.ApiTable class="table table-striped table-bordered table-condensed"}}
99 </ div >
10+ {{#if userHasBookmarks}}
11+ {{> bookmarks}}
12+ {{/if}}
1013 </ div >
1114 </ div >
1215</ template >
Original file line number Diff line number Diff line change 1+ Template . catalogue . helpers ( {
2+ userHasBookmarks : function ( ) {
3+ // Get current user bookmark (should be only one API Bookmarks result available)
4+ var userBookmarks = ApiBookmarks . findOne ( ) ;
5+
6+ // get array of API IDs
7+ var apiIds = userBookmarks . apiIds ;
8+ console . log ( apiIds ) ;
9+
10+ // Check if user has bookmarked apis
11+ if ( apiIds . length > 0 ) {
12+ return true ;
13+ } else {
14+ return false ;
15+ }
16+ }
17+ } ) ;
You can’t perform that action at this time.
0 commit comments