mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-09 08:47:11 -05:00
24 lines
386 B
Ruby
24 lines
386 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::V1::PointsController < ApplicationController
|
|
skip_forgery_protection
|
|
|
|
def create
|
|
Owntracks::PointCreatingJob.perform_later(point_params)
|
|
|
|
render json: {}, status: :ok
|
|
end
|
|
|
|
def destroy
|
|
@point = Point.find(params[:id])
|
|
@point.destroy
|
|
|
|
head :no_content
|
|
end
|
|
|
|
private
|
|
|
|
def point_params
|
|
params.permit!
|
|
end
|
|
end
|