mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 09:41:40 -05:00
13 lines
412 B
Ruby
13 lines
412 B
Ruby
# frozen_string_literal: true
|
|
|
|
class Api::V1::Visits::PossiblePlacesController < ApiController
|
|
def index
|
|
visit = current_api_user.visits.find(params[:id])
|
|
# Assuming you have a method to fetch possible places
|
|
possible_places = visit.suggested_places
|
|
|
|
render json: possible_places
|
|
rescue ActiveRecord::RecordNotFound
|
|
render json: { error: 'Visit not found' }, status: :not_found
|
|
end
|
|
end
|