mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: allow pin training
This commit is contained in:
1 parent
6607a36856
commit
a7f364e651
10 files changed
+51
-25
No files matched your search
@@ -85,6 +85,7 @@ export const PERM = {
|
||||
PERM_VIEW_TRAINING: 1n << 46n,
|
||||
PERM_CREATE_TRAINING: 1n << 47n,
|
||||
PERM_EDIT_TRAINING: 1n << 48n,
|
||||
PERM_PIN_TRAINING: 1n << 63n,
|
||||
PERM_EDIT_TRAINING_SELF: 1n << 49n,
|
||||
|
||||
// Ranking
|
||||
|
||||
@@ -114,7 +114,7 @@ export async function getList(domainId: string, tids: ObjectID[]) {
|
||||
}
|
||||
|
||||
export const getMulti = (domainId: string, query: FilterQuery<TrainingDoc> = {}) =>
|
||||
document.getMulti(domainId, document.TYPE_TRAINING, query).sort('_id', 1);
|
||||
document.getMulti(domainId, document.TYPE_TRAINING, query).sort({ pin: -1, _id: -1 });
|
||||
|
||||
global.Hydro.model.training = {
|
||||
getPids,
|
||||
|
||||
Reference in new issue
Block a user