dawarich/app/controllers/api/v1/points_controller.rb

13 lines
284 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class Api::V1::PointsController < ApplicationController
before_action :authenticate_user!
def destroy
point = current_user.tracked_points.find(params[:id])
point.destroy
render json: { message: 'Point deleted successfully' }
end
end