mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
core&ui: user_detail: show solutions (#414)
This commit is contained in:
1 parent
e3dd65c690
commit
6ed4d74210
8 files changed
+62
-30
No files matched your search
@@ -46,6 +46,13 @@ class SolutionModel {
|
||||
).sort({ vote: -1 });
|
||||
}
|
||||
|
||||
static getByUser(domainId: string, uid: number) {
|
||||
return document.getMulti(
|
||||
domainId, document.TYPE_PROBLEM_SOLUTION,
|
||||
{ parentType: document.TYPE_PROBLEM, owner: uid },
|
||||
).sort({ _id: -1 });
|
||||
}
|
||||
|
||||
static reply(domainId: string, psid: ObjectID, owner: number, content: string) {
|
||||
return document.push(domainId, document.TYPE_PROBLEM_SOLUTION, psid, 'reply', content, owner);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user