2024-05-18 07:35:48 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2024-05-25 06:57:39 -04:00
|
|
|
# TODO: Deprecate in 1.0
|
|
|
|
|
|
2024-03-15 18:27:31 -04:00
|
|
|
class Api::V1::PointsController < ApplicationController
|
|
|
|
|
skip_forgery_protection
|
|
|
|
|
|
|
|
|
|
def create
|
2024-05-25 06:57:39 -04:00
|
|
|
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
|
|
|
|
2024-04-02 11:37:38 -04:00
|
|
|
render json: {}, status: :ok
|
2024-03-15 18:27:31 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
|
|
def point_params
|
2024-04-07 16:36:39 -04:00
|
|
|
params.permit!
|
2024-03-15 18:27:31 -04:00
|
|
|
end
|
|
|
|
|
end
|