mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 11:13:08 +02:00
[Fuck] Type definition
This commit is contained in:
parent
19660cb48b
commit
7f19822b65
16 changed files with 16 additions and 16 deletions
|
@ -5,4 +5,4 @@ const collection = db.get('access_tokens');
|
||||||
(collection as any).index('token'); // fuck type definition
|
(collection as any).index('token'); // fuck type definition
|
||||||
(collection as any).index('hash'); // fuck type definition
|
(collection as any).index('hash'); // fuck type definition
|
||||||
|
|
||||||
export default collection;
|
export default collection as any; // fuck type definition
|
||||||
|
|
|
@ -6,4 +6,4 @@ const collection = db.get('apps');
|
||||||
(collection as any).index('name_id_lower'); // fuck type definition
|
(collection as any).index('name_id_lower'); // fuck type definition
|
||||||
(collection as any).index('secret'); // fuck type definition
|
(collection as any).index('secret'); // fuck type definition
|
||||||
|
|
||||||
export default collection;
|
export default collection as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('appdata');
|
export default db.get('appdata') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('auth_sessions');
|
export default db.get('auth_sessions') as any; // fuck type definition
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('drive_files');
|
export default db.get('drive_files') as any; // fuck type definition
|
||||||
|
|
||||||
export function validateFileName(name: string): boolean {
|
export function validateFileName(name: string): boolean {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('drive_folders');
|
export default db.get('drive_folders') as any; // fuck type definition
|
||||||
|
|
||||||
export function isValidFolderName(name: string): boolean {
|
export function isValidFolderName(name: string): boolean {
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('drive_tags');
|
export default db.get('drive_tags') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('favorites');
|
export default db.get('favorites') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('following');
|
export default db.get('following') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('likes');
|
export default db.get('likes') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('messaging_histories');
|
export default db.get('messaging_histories') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('messaging_messages');
|
export default db.get('messaging_messages') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('notifications');
|
export default db.get('notifications') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('posts');
|
export default db.get('posts') as any; // fuck type definition
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
import db from '../../db/mongodb';
|
import db from '../../db/mongodb';
|
||||||
|
|
||||||
export default db.get('signin');
|
export default db.get('signin') as any; // fuck type definition
|
||||||
|
|
|
@ -5,7 +5,7 @@ const collection = db.get('users');
|
||||||
(collection as any).index('username'); // fuck type definition
|
(collection as any).index('username'); // fuck type definition
|
||||||
(collection as any).index('token'); // fuck type definition
|
(collection as any).index('token'); // fuck type definition
|
||||||
|
|
||||||
export default collection;
|
export default collection as any; // fuck type definition
|
||||||
|
|
||||||
export function validateUsername(username: string): boolean {
|
export function validateUsername(username: string): boolean {
|
||||||
return /^[a-zA-Z0-9\-]{3,20}$/.test(username);
|
return /^[a-zA-Z0-9\-]{3,20}$/.test(username);
|
||||||
|
|
Loading…
Reference in a new issue