Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	backend/src/controllers/user/UserEndorsementAdminController.ts
  • Loading branch information
ngoerlitz committed May 19, 2024
2 parents c944e68 + 90d4d23 commit 9919a86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions backend/src/libraries/vateud/VateudCoreLibrary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ async function _send<T>(props: SendT): Promise<T | undefined> {

return res.data as T;
} catch (e: any) {
console.error(e)
Logger.log(LogLevels.LOG_WARN, e);
return undefined;
}
Expand Down Expand Up @@ -134,7 +135,8 @@ export async function removeSolo(userSolo: UserSolo) {
* On failure, it schedules a job which repeats the same request n times until it succeeds
* - If it fails more than n times, then it really isn't our problem anymore tbh...
*/
export async function createEndorsement(userEndorsement: EndorsementGroupsBelongsToUsers, endorsementGroup: EndorsementGroup) {
export async function createEndorsement(userEndorsement: EndorsementGroupsBelongsToUsers, endorsementGroup: EndorsementGroup | null) {
if(!endorsementGroup) return false;
const endorsementInfo: VateudCoreEndorsementCreateT = {
local_id: userEndorsement.id,
post_data: {
Expand All @@ -145,7 +147,7 @@ export async function createEndorsement(userEndorsement: EndorsementGroupsBelong
};

const res = await _send<VateudCoreSoloCreateResponseT>({
endpoint: `facility/endorsements/tier${endorsementGroup.tier}`,
endpoint: `facility/endorsements/tier-${endorsementGroup.tier}`,
method: "post",
data: endorsementInfo.post_data,
});
Expand Down
2 changes: 1 addition & 1 deletion backend/src/models/EndorsementGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class EndorsementGroup extends Model<InferAttributes<EndorsementGroup>, I
// Attributes
//
declare name: string;
declare tier: Number;
declare tier: number;

//
// Optional Attributes
Expand Down

0 comments on commit 9919a86

Please sign in to comment.