1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Can reload survey

This commit is contained in:
2020-05-18 19:15:16 +02:00
parent e0d69ab504
commit b337e632bd
4 changed files with 25 additions and 4 deletions

View File

@ -8,6 +8,13 @@ import 'package:meta/meta.dart';
/// @author Pierre HUBERT
class SurveyHelper {
/// Get information about a single survey
static Future<Survey> getSurveyInfo(int postID) async =>
apiToSurvey((await APIRequest.withLogin("surveys/get_info")
.addInt("postID", postID)
.execWithThrow())
.getObject());
/// Cancel the response of a user to a survey
Future<bool> cancelResponse(Survey survey) async {
return (await APIRequest(