dawarich/app/controllers/api/v1/owntracks/points_controller.rb
Evgenii Burmakin f4ce656aac
Move points creation logic from background jobs to service objects (#2145)
* Move points creation logic from background jobs to service objects

* Remove unused point creation jobs

* Update changelog
2026-01-11 12:05:02 +01:00

18 lines
398 B
Ruby

# frozen_string_literal: true
class Api::V1::Owntracks::PointsController < ApiController
before_action :authenticate_active_api_user!, only: %i[create]
before_action :validate_points_limit, only: %i[create]
def create
OwnTracks::PointCreator.new(point_params, current_api_user.id).call
render json: {}, status: :ok
end
private
def point_params
params.permit!
end
end