mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
15 lines
341 B
Ruby
15 lines
341 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Owntracks::PointCreatingJob < ApplicationJob
|
|
include PointValidation
|
|
|
|
queue_as :default
|
|
|
|
def perform(point_params, user_id)
|
|
parsed_params = OwnTracks::Params.new(point_params).call
|
|
|
|
return if point_exists?(parsed_params, user_id)
|
|
|
|
Point.create!(parsed_params.merge(user_id:))
|
|
end
|
|
end
|