diff --git a/app/views/devise/registrations/_api_key.html.erb b/app/views/devise/registrations/_api_key.html.erb index ee535d59..21b81963 100644 --- a/app/views/devise/registrations/_api_key.html.erb +++ b/app/views/devise/registrations/_api_key.html.erb @@ -2,6 +2,8 @@

Use this API key to authenticate your requests.

<%= current_user.api_key %>

+

Docs: <%= link_to "API documentation", '/api-docs', class: 'underline hover:no-underline' %>

+ Usage example:
diff --git a/db/data/20240525110530_bind_existing_points_to_first_user.rb b/db/data/20240525110530_bind_existing_points_to_first_user.rb index 21fab9a4..3f86e437 100644 --- a/db/data/20240525110530_bind_existing_points_to_first_user.rb +++ b/db/data/20240525110530_bind_existing_points_to_first_user.rb @@ -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)