add tests for controllers and ActionCable channels; improve main backend docs

This commit is contained in:
2026-10-27 10:32:40 +03:00
parent b122cbb652
commit 50e8aacfa9
17 changed files with 1127 additions and 63 deletions
@@ -2,7 +2,9 @@ class Api::SessionsController < ApplicationController
skip_before_action :authenticate_request!, only: [:create]
def create
user = User.authenticate_by(params.permit(:nickname, :password))
user = if params[:nickname].present? && params[:password].present?
User.authenticate_by(params.permit(:nickname, :password))
end
if user
token = JwtService.encode(user_id: user.id)
+7
View File
@@ -0,0 +1,7 @@
class ApplicationJob < ActiveJob::Base
# Automatically retry jobs that encountered a deadlock
# retry_on ActiveRecord::Deadlocked
# Most jobs are safe to ignore if the underlying records are no longer available
# discard_on ActiveJob::DeserializationError
end