mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-25 23:09:22 +00:00
Switch to base handler
This commit is contained in:
parent
47cb6cac84
commit
92486a01ac
@ -1,9 +1,9 @@
|
|||||||
import { RequestHandler } from "../entities/RequestHandler";
|
|
||||||
import { LikesType, LikesHelper } from "../helpers/LikesHelper";
|
import { LikesType, LikesHelper } from "../helpers/LikesHelper";
|
||||||
import { UserHelper } from "../helpers/UserHelper";
|
import { UserHelper } from "../helpers/UserHelper";
|
||||||
import { GroupsAccessLevel } from "../entities/Group";
|
import { GroupsAccessLevel } from "../entities/Group";
|
||||||
import { UserLike } from "../entities/UserLike";
|
import { UserLike } from "../entities/UserLike";
|
||||||
import { NotificationsHelper } from "../helpers/NotificationsHelper";
|
import { NotificationsHelper } from "../helpers/NotificationsHelper";
|
||||||
|
import { BaseRequestsHandler } from "../entities/BaseRequestsHandler";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Likes controller
|
* Likes controller
|
||||||
@ -17,7 +17,7 @@ export class LikesController {
|
|||||||
*
|
*
|
||||||
* @param h Request handler
|
* @param h Request handler
|
||||||
*/
|
*/
|
||||||
public static async Update(h: RequestHandler) {
|
public static async Update(h: BaseRequestsHandler) {
|
||||||
const req_type = h.postString("type");
|
const req_type = h.postString("type");
|
||||||
const is_linking = h.postBool("like");
|
const is_linking = h.postBool("like");
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ export class LikesController {
|
|||||||
await LikesHelper.Update(h.getUserId(), is_linking, id, type);
|
await LikesHelper.Update(h.getUserId(), is_linking, id, type);
|
||||||
|
|
||||||
|
|
||||||
h.success();
|
h.success("");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user