dawarich/app/controllers/points_controller.rb

10 lines
207 B
Ruby
Raw Normal View History

2024-03-15 18:27:31 -04:00
class PointsController < ApplicationController
before_action :authenticate_user!
2024-03-15 18:27:31 -04:00
def index
@points = current_user.points
2024-03-15 18:27:31 -04:00
@coordinates = @points.as_json(only: [:latitude, :longitude])
end
end