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) {
|
if (!stageClass) {
|
||||||
throw new Error(`Unknown stage: ${stage}`);
|
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) {
|
if (!firstStage) {
|
||||||
firstStage = registrationStage;
|
firstStage = registrationStage;
|
||||||
lastStage = registrationStage;
|
lastStage = registrationStage;
|
||||||
|
@ -15,12 +15,11 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import type {BaseRegistrationStage} from "./stages/BaseRegistrationStage";
|
import type {BaseRegistrationStage} from "./stages/BaseRegistrationStage";
|
||||||
import type {HomeServerApi} from "../net/HomeServerApi";
|
import type {RegistrationParams} from "./types";
|
||||||
import type {AccountDetails, RegistrationParams} from "./types";
|
|
||||||
import {DummyAuth} from "./stages/DummyAuth";
|
import {DummyAuth} from "./stages/DummyAuth";
|
||||||
import {TermsAuth} from "./stages/TermsAuth";
|
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{
|
export function registrationStageFromType(type: string): ClassDerivedFromBaseRegistration | undefined{
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
@ -18,15 +18,11 @@ import type {HomeServerApi} from "../../net/HomeServerApi";
|
|||||||
import type {AccountDetails, AuthenticationData, RegistrationParams} from "../types";
|
import type {AccountDetails, AuthenticationData, RegistrationParams} from "../types";
|
||||||
|
|
||||||
export abstract class BaseRegistrationStage {
|
export abstract class BaseRegistrationStage {
|
||||||
protected readonly _hsApi: HomeServerApi;
|
|
||||||
protected readonly _accountDetails: AccountDetails;
|
|
||||||
protected _session: string;
|
protected _session: string;
|
||||||
protected _nextStage: BaseRegistrationStage;
|
protected _nextStage: BaseRegistrationStage;
|
||||||
protected readonly _params?: Record<string, any>
|
protected readonly _params?: Record<string, any>
|
||||||
|
|
||||||
constructor(hsApi: HomeServerApi, accountDetails: AccountDetails, session: string, params?: RegistrationParams) {
|
constructor(session: string, params?: RegistrationParams) {
|
||||||
this._hsApi = hsApi;
|
|
||||||
this._accountDetails = accountDetails;
|
|
||||||
this._session = session;
|
this._session = session;
|
||||||
this._params = params;
|
this._params = params;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user