mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix lint.
This commit is contained in:
@@ -53,7 +53,7 @@ class User extends BaseModel {
|
||||
update: false,
|
||||
delete: false,
|
||||
})
|
||||
@TableColumn({title: "Email"})
|
||||
@TableColumn({ title: 'Email' })
|
||||
@UniqueColumn()
|
||||
@RequiredColumn()
|
||||
@Column({
|
||||
@@ -80,7 +80,7 @@ class User extends BaseModel {
|
||||
update: false,
|
||||
delete: false,
|
||||
})
|
||||
@TableColumn({title: "Password"})
|
||||
@TableColumn({ title: 'Password' })
|
||||
@HashedColumn()
|
||||
@Column({
|
||||
type: ColumnType.HashedString,
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
import BaseModel from '../../Models/BaseModel';
|
||||
|
||||
export default (displayAs: string) => {
|
||||
return (target: Object, propertyKey: string) => {
|
||||
const baseModel: BaseModel = target as BaseModel;
|
||||
baseModel.addTableColumn(propertyKey, displayAs);
|
||||
};
|
||||
};
|
||||
@@ -25,12 +25,14 @@ const BasicForm = <T extends Object,>(props: ComponentProps<T>): ReactElement =>
|
||||
|
||||
const getFormField = (field: DataField<T>, index: number): ReactElement => {
|
||||
|
||||
let fieldType = "text";
|
||||
let fieldType = "text";
|
||||
if (Object.keys(field.field).length === 0) {
|
||||
throw new BadDataException("Object cannot be without Field")
|
||||
}
|
||||
}
|
||||
return (<div key={index}>
|
||||
<Field type={fieldType} label={field.title} name={Object.keys(field.field)[0] as string} />
|
||||
<label>{field.title}</label>
|
||||
<p>{field.description}</p>
|
||||
<Field type={fieldType} name={Object.keys(field.field)[0] as string} />
|
||||
<ErrorMessage name={Object.keys(field.field)[0] as string} component="div" />
|
||||
</div>)
|
||||
}
|
||||
@@ -49,14 +51,14 @@ const BasicForm = <T extends Object,>(props: ComponentProps<T>): ReactElement =>
|
||||
props.onSubmit(values);
|
||||
}}
|
||||
>
|
||||
|
||||
|
||||
{({ isSubmitting }) => (
|
||||
<Form>
|
||||
<h1>{ props.title}</h1>
|
||||
<h1>{props.title}</h1>
|
||||
{props.fields && props.fields.map((field: DataField<T>, i) => {
|
||||
return getFormField(field, i);
|
||||
})}
|
||||
<Button title={ props.submitButtonText || "Submit" } disabled={isSubmitting} type={ButtonTypes.Submit} id={`${props.id}-submit-button`} />
|
||||
<Button title={props.submitButtonText || "Submit"} disabled={isSubmitting} type={ButtonTypes.Submit} id={`${props.id}-submit-button`} />
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
|
||||
@@ -300,8 +300,8 @@ describe('Incoming HTTP Request API', function (): void {
|
||||
});
|
||||
});
|
||||
|
||||
it('should create an incident with incoming http request url', (done: $TSFixMe): void => {
|
||||
axios({
|
||||
it('should create an incident with incoming http request url', async (done: $TSFixMe): void => {
|
||||
await axios({
|
||||
method: 'post',
|
||||
url: createIncidentUrl,
|
||||
}).then((res: $TSFixMe): void => {
|
||||
@@ -312,8 +312,8 @@ describe('Incoming HTTP Request API', function (): void {
|
||||
});
|
||||
});
|
||||
|
||||
it('should acknowledge an incident with an incoming http request url', (done: $TSFixMe): void => {
|
||||
axios({
|
||||
it('should acknowledge an incident with an incoming http request url', async (done: $TSFixMe): void => {
|
||||
await axios({
|
||||
method: 'post',
|
||||
url: acknowledgeIncidentUrl,
|
||||
}).then((res: $TSFixMe): void => {
|
||||
@@ -324,8 +324,8 @@ describe('Incoming HTTP Request API', function (): void {
|
||||
});
|
||||
});
|
||||
|
||||
it('should resolve an incident with an incoming http request url', (done: $TSFixMe): void => {
|
||||
axios({
|
||||
it('should resolve an incident with an incoming http request url', async (done: $TSFixMe): void => {
|
||||
await axios({
|
||||
method: 'post',
|
||||
url: resolveIncidentUrl,
|
||||
}).then((res: $TSFixMe): void => {
|
||||
@@ -336,9 +336,9 @@ describe('Incoming HTTP Request API', function (): void {
|
||||
});
|
||||
});
|
||||
|
||||
it('should add incident note with an incoming http request url', (done: $TSFixMe): void => {
|
||||
it('should add incident note with an incoming http request url', async (done: $TSFixMe): void => {
|
||||
// It should also work for a get request
|
||||
axios({
|
||||
await axios({
|
||||
method: 'get',
|
||||
url: incidentNoteUrl,
|
||||
}).then((res: $TSFixMe): void => {
|
||||
@@ -349,8 +349,8 @@ describe('Incoming HTTP Request API', function (): void {
|
||||
});
|
||||
});
|
||||
|
||||
it('should add internal note with an incoming http request url', (done: $TSFixMe): void => {
|
||||
axios({
|
||||
it('should add internal note with an incoming http request url', async (done: $TSFixMe): void => {
|
||||
await axios({
|
||||
method: 'get',
|
||||
url: internalNoteUrl,
|
||||
}).then((res: $TSFixMe): void => {
|
||||
|
||||
@@ -100,7 +100,7 @@ router.post(
|
||||
|
||||
if (alreadySavedUser) {
|
||||
// Send Welcome Mail
|
||||
MailService.sendMail(
|
||||
await MailService.sendMail(
|
||||
user.email,
|
||||
EmailSubjects.getSubjectByType(
|
||||
EmailTemplateType.SIGNUP_WELCOME_EMAIL
|
||||
@@ -117,7 +117,7 @@ router.post(
|
||||
);
|
||||
} else {
|
||||
// Send EmailVerification Link because this is a new user.
|
||||
MailService.sendMail(
|
||||
await MailService.sendMail(
|
||||
user.email,
|
||||
EmailSubjects.getSubjectByType(
|
||||
EmailTemplateType.SIGNUP_WELCOME_EMAIL
|
||||
|
||||
@@ -2,8 +2,8 @@ import { JSONObjectOrArray } from 'Common/Types/JSON';
|
||||
import io, { Socket } from 'CommonServer/Infrastructure/SocketIO';
|
||||
import ObjectID from 'Common/Types/ObjectID';
|
||||
io.sockets.on('connection', (socket: Socket) => {
|
||||
socket.on('project', (projectId: ObjectID) => {
|
||||
socket.join(projectId.toString());
|
||||
socket.on('project', async (projectId: ObjectID) => {
|
||||
await socket.join(projectId.toString());
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user