diff options
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v2/photos_controller.rb | 13 | ||||
| -rw-r--r-- | app/controllers/api/v2/users_controller.rb | 9 |
2 files changed, 22 insertions, 0 deletions
diff --git a/app/controllers/api/v2/photos_controller.rb b/app/controllers/api/v2/photos_controller.rb new file mode 100644 index 00000000..c4240327 --- /dev/null +++ b/app/controllers/api/v2/photos_controller.rb @@ -0,0 +1,13 @@ +module Api + module V2 + class PhotosController < ApplicationController + def index + @photos = Photo.page(page).per(per_page) + end + + def show(id = params[:id]) + @photo = Photo.find(id) + end + end + end +end diff --git a/app/controllers/api/v2/users_controller.rb b/app/controllers/api/v2/users_controller.rb new file mode 100644 index 00000000..eaa435b4 --- /dev/null +++ b/app/controllers/api/v2/users_controller.rb @@ -0,0 +1,9 @@ +module Api + module V2 + class UsersController < ApplicationController + def show(id = params[:id]) + @user = User.find(id) + end + end + end +end |
