feat(server): sign-up restrictions for self-hosted

This commit is contained in:
a.bouhuolia
2023-05-07 17:22:18 +02:00
parent 36611652da
commit ad3c9ebfe9
10 changed files with 171 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
import { Service } from 'typedi';
import { IAuthGetMetaPOJO } from '@/interfaces';
import config from '@/config';
@Service()
export class GetAuthMeta {
/**
* Retrieves the authentication meta for SPA.
* @returns {Promise<IAuthGetMetaPOJO>}
*/
public async getAuthMeta(): Promise<IAuthGetMetaPOJO> {
return {
signupDisabled: config.signupRestrictions.disabled,
};
}
}