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

21 lines
415 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# TODO: Deprecate in 1.0
2024-03-15 18:27:31 -04:00
class Api::V1::PointsController < ApplicationController
skip_forgery_protection
def create
Rails.logger.info 'This endpoint will be deprecated in 1.0. Use /api/v1/owntracks/points instead'
2024-04-06 13:09:38 -04:00
Owntracks::PointCreatingJob.perform_later(point_params)
2024-03-15 18:27:31 -04:00
render json: {}, status: :ok
2024-03-15 18:27:31 -04:00
end
private
def point_params
params.permit!
2024-03-15 18:27:31 -04:00
end
end