mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-28 21:28:19 +01:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/836 Closes #850 Approved-by: dakkar <dakkar@thenautilus.net> Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
commit
4b6a338e0d
1 changed files with 1 additions and 2 deletions
|
@ -3,7 +3,6 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import RE2 from 're2';
|
||||
import * as mfm from '@transfem-org/sfm-js';
|
||||
import { Inject, Injectable } from '@nestjs/common';
|
||||
import ms from 'ms';
|
||||
|
@ -325,7 +324,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
if (!regexp) throw new ApiError(meta.errors.invalidRegexp);
|
||||
|
||||
try {
|
||||
new RE2(regexp[1], regexp[2]);
|
||||
new RegExp(regexp[1], regexp[2]);
|
||||
} catch (err) {
|
||||
throw new ApiError(meta.errors.invalidRegexp);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue