Add link to api rocs

This commit is contained in:
Eugene Burmakin 2024-05-25 14:44:32 +02:00
parent bc8647f5e4
commit d52b538398
2 changed files with 4 additions and 0 deletions

View file

@ -2,6 +2,8 @@
<p class='py-2'>Use this API key to authenticate your requests.</p>
<code><%= current_user.api_key %></code>
<p class='py-2'>
<p>Docs: <%= link_to "API documentation", '/api-docs', class: 'underline hover:no-underline' %></p>
Usage example:
<div role="tablist" class="tabs tabs-boxed">

View file

@ -4,6 +4,8 @@ class BindExistingPointsToFirstUser < ActiveRecord::Migration[7.1]
def up
user = User.first
return if user.blank?
points = Point.where(user_id: nil)
points.update_all(user_id: user.id)