Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/CodeNow/api-server into m…
Browse files Browse the repository at this point in the history
…ulti_docker
  • Loading branch information
Ubuntu committed Sep 10, 2013
2 parents cedbfb1 + 988d6b5 commit 96e1353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/models/images.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,10 @@ imageSchema.statics.createFromContainer = (domain, container, cb) ->
image.save domain.intercept () ->
cb null, image

imageSchema.statics.searchByName = (domain, searchText, limit, cb) ->
imageSchema.statics.search = (domain, searchText, limit, cb) ->
opts =
filter : tags:$not:$size:0
project: name:1, description:1
project: name:1, description:1, tags:1
limit : if (limit <= configs.defaultPageLimit) then limit else configs.defaultPageLimit
this.textSearch searchText, opts, (err, output) ->
if err then throw err else
Expand Down
2 changes: 1 addition & 1 deletion src/models/runnables.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ Runnables =
cb()

searchImages: (domain, searchText, limit, cb) ->
images.searchByName domain, searchText, limit, (err, results) ->
images.search domain, searchText, limit, (err, results) ->
if err then cb err else
results.forEach (res) ->
res._id = encodeId res._id
Expand Down

0 comments on commit 96e1353

Please sign in to comment.