1
0
Fork 0
forked from gitea/nas

Add support for invite codes in the registration API (#27805)

This commit is contained in:
Claire 2023-11-13 14:27:00 +01:00 committed by GitHub
parent 5bca5c4c5b
commit 07a4059901
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 158 additions and 78 deletions

View file

@ -1368,6 +1368,7 @@ en:
'86400': 1 day
expires_in_prompt: Never
generate: Generate invite link
invalid: This invite is not valid
invited_by: 'You were invited by:'
max_uses:
one: 1 use

View file

@ -81,6 +81,8 @@ Rails.application.routes.draw do
resource :outbox, only: [:show], module: :activitypub
end
get '/invite/:invite_code', constraints: ->(req) { req.format == :json }, to: 'api/v1/invites#show'
devise_scope :user do
get '/invite/:invite_code', to: 'auth/registrations#new', as: :public_invite