mirror of https://github.com/msgbyte/tailchat
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
881 B
TypeScript
43 lines
881 B
TypeScript
import type { ResourceWithOptions } from 'adminjs';
|
|
import User from '../../models/user/user';
|
|
import Group from '../../models/group/group';
|
|
import Message from '../../models/chat/message';
|
|
import File from '../../models/file';
|
|
|
|
export function getResources() {
|
|
return [
|
|
{
|
|
resource: User,
|
|
options: {
|
|
properties: {
|
|
email: {
|
|
isDisabled: true,
|
|
},
|
|
username: {
|
|
isVisible: false,
|
|
},
|
|
password: {
|
|
isVisible: false,
|
|
},
|
|
},
|
|
sort: {
|
|
direction: 'desc',
|
|
sortBy: 'createdAt',
|
|
},
|
|
},
|
|
} as ResourceWithOptions,
|
|
Group,
|
|
{
|
|
resource: Message,
|
|
options: {
|
|
properties: {
|
|
content: {
|
|
type: 'textarea',
|
|
},
|
|
},
|
|
},
|
|
} as ResourceWithOptions,
|
|
File,
|
|
];
|
|
}
|