mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Remove dead code
This commit is contained in:
parent
e8c480426a
commit
e66549a067
@ -77,7 +77,7 @@ export class Registration {
|
||||
if (!stageClass) {
|
||||
throw new Error(`Unknown stage: ${stage}`);
|
||||
}
|
||||
const registrationStage = new stageClass(this._hsApi, this._accountDetails, session, params?.[stage]);
|
||||
const registrationStage = new stageClass(session, params?.[stage]);
|
||||
if (!firstStage) {
|
||||
firstStage = registrationStage;
|
||||
lastStage = registrationStage;
|
||||
|
@ -15,12 +15,11 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
import type {BaseRegistrationStage} from "./stages/BaseRegistrationStage";
|
||||
import type {HomeServerApi} from "../net/HomeServerApi";
|
||||
import type {AccountDetails, RegistrationParams} from "./types";
|
||||
import type {RegistrationParams} from "./types";
|
||||
import {DummyAuth} from "./stages/DummyAuth";
|
||||
import {TermsAuth} from "./stages/TermsAuth";
|
||||
|
||||
type ClassDerivedFromBaseRegistration = { new(hsApi: HomeServerApi, registrationData: AccountDetails, session: string, params?: RegistrationParams): BaseRegistrationStage } & typeof BaseRegistrationStage;
|
||||
type ClassDerivedFromBaseRegistration = { new(session: string, params?: RegistrationParams): BaseRegistrationStage } & typeof BaseRegistrationStage;
|
||||
|
||||
export function registrationStageFromType(type: string): ClassDerivedFromBaseRegistration | undefined{
|
||||
switch (type) {
|
||||
|
@ -18,15 +18,11 @@ import type {HomeServerApi} from "../../net/HomeServerApi";
|
||||
import type {AccountDetails, AuthenticationData, RegistrationParams} from "../types";
|
||||
|
||||
export abstract class BaseRegistrationStage {
|
||||
protected readonly _hsApi: HomeServerApi;
|
||||
protected readonly _accountDetails: AccountDetails;
|
||||
protected _session: string;
|
||||
protected _nextStage: BaseRegistrationStage;
|
||||
protected readonly _params?: Record<string, any>
|
||||
|
||||
constructor(hsApi: HomeServerApi, accountDetails: AccountDetails, session: string, params?: RegistrationParams) {
|
||||
this._hsApi = hsApi;
|
||||
this._accountDetails = accountDetails;
|
||||
constructor(session: string, params?: RegistrationParams) {
|
||||
this._session = session;
|
||||
this._params = params;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user